scenebuilder icon indicating copy to clipboard operation
scenebuilder copied to clipboard

Included fxml should can be handled as control.

Open bdh92123 opened this issue 4 years ago • 4 comments

Issue

https://github.com/gluonhq/scenebuilder/issues/319 Included fxml can't be focused, moved, resized.

Fixes

  • Included fxml also can be handled in scene builder. So it can also be focused, moved or resized like other node.
  • Fixed a bug where the context menu did not appear on included fxml nodes.

bdh92123 avatar Feb 04 '21 08:02 bdh92123

Interesting. It would be good to have a test that fails before and runs after this patch is applied, can you add some test for this?

johanvos avatar Feb 12 '21 19:02 johanvos

Hi @johanvos . I uploaded some test in Issue #319 .

However, this fix uses a trick that temporarily treats the FXInstrinsic node as an FXOMInstance node, so it would be correct to fundamentally fix the intrinsic node so that it can also be relocated, resized and focused if it's type is 'fx:include'.

Thanks.

bdh92123 avatar Feb 16 '21 07:02 bdh92123

Hi @bdh92123,

Thank you for the PR. How big of an effort is it to properly fix this in the Intrinsic node?

abhinayagarwal avatar May 25 '21 06:05 abhinayagarwal

Hi @abhinayagarwal , Scene Builder is designed so that only nodes with bounds (FXOMInstance) can be positioned or resized. Intrinsic node is treated as a completely different class (FXIntrinsic), so if you don't use the trick I did, I think it may require quite a bit of effort. Thanks.

bdh92123 avatar Jun 09 '21 03:06 bdh92123