Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scenebuilder on MacOS does not display menu #404

Closed
nevillebrailsford opened this issue Sep 4, 2021 · 8 comments · Fixed by #405
Closed

Scenebuilder on MacOS does not display menu #404

nevillebrailsford opened this issue Sep 4, 2021 · 8 comments · Fixed by #405
Labels
bug Something isn't working

Comments

@nevillebrailsford
Copy link

nevillebrailsford commented Sep 4, 2021

Scenebuilder on MacOS does not show menu when FXML file has useMenuSystemBar set to true in the FXML file loaded into SceneBuilder..

Expected Behavior

SceneBuilder should show its full menu no matter what the FXML file being edited contains.

Current Behavior

SceneBuilder shows the menu from the FXML file.

Steps to Reproduce

Run SceneBuilder on macOS and load an FXML file that contains something like:

Your Environment

Product Version
JavaFX Scene Builder 16.0.0

Build Information
Version 16.0.0
Date: 2021-03-26 18:42:37
JavaFX Version: 16
Java Version: 16+36, AdoptOpenJDK

Logging
The default configuration stores logging output in a file named scenebuilder-16.0.0.log (possibly followed by a trailing '.' and a digit).
The default file path is /var/folders/6x/pg8zpv0s1jj6vnpxn028g7dc0000gn/T/scenebuilder-16.0.0.log

JavaFX
16

Java
16+36, AdoptOpenJDK

Operating System
Mac OS X, x86_64, 10.16

Screenshots

Screenshot 2021-09-04 at 09 55 24

@nevillebrailsford nevillebrailsford added the bug Something isn't working label Sep 4, 2021
@nevillebrailsford
Copy link
Author

Oops - forgot to add this to the Steps to reproduce section:

@nevillebrailsford
Copy link
Author

&lt.MenuBar useSystemMenuBar="true" BorderPane.alignment="CENTER"&gt.

@Oliver-Loeffler
Copy link
Collaborator

Hello @nevillebrailsford.

I am able to reproduce the issue. When having 2 scenes open for editing in Scene Builder, switching to Scene different from the one with useSystemMenuBar="true" will restore the menu. But, this is unsatisfying.

What is the desirable behavior, what do you think @nevillebrailsford & @abhinayagarwal ?

For both versions, if the property useSystemMenuBar="true" is configured for a MenuBar, to keep Scene Builder usable, the MenuBar must always be displayed within the editor window. But for previews this can be different.

Version 1:

  • When launching a preview, then the MenuBar shall be visible as configured in the FXML, in the MacOS system menu bar.

Version 2:

  • When launching a preview, then the MenuBar shall be visible inside the preview window only.

Another point, not yet part of this issue, is that the property useSystemMenuBar is not shown as an editable property (not even read-only) in the Inspector node properties for MenuBar. Would this make sense to at least show its value for MenuBars?

Oliver-Loeffler added a commit to Oliver-Loeffler/scenebuilder that referenced this issue Sep 7, 2021
Oliver-Loeffler added a commit to Oliver-Loeffler/scenebuilder that referenced this issue Sep 7, 2021
Oliver-Loeffler added a commit to Oliver-Loeffler/scenebuilder that referenced this issue Sep 7, 2021
Oliver-Loeffler added a commit to Oliver-Loeffler/scenebuilder that referenced this issue Sep 7, 2021
Oliver-Loeffler added a commit to Oliver-Loeffler/scenebuilder that referenced this issue Sep 7, 2021
@nevillebrailsford
Copy link
Author

Hi Oliver,
Thnaks for picking up on this issue - my preference for the behaviour would be version 1, as described in your comment above.

@Oliver-Loeffler
Copy link
Collaborator

Version 1 is implemented in the PR #405. If you like, try out the issue-404 branch of my SceneBuilder mirror. Clone, switch to branch issue-404 and run with maven.

mvn install
mvn javafx:run -f app

@nevillebrailsford
Copy link
Author

Hi Oliver,
I have tried the fix and all looks good. Thanks very much.

@jperedadnr
Copy link
Collaborator

Version 1 is the way to go, only when you have a focused preview window it can take the system menu bar like any other active app.

About adding the useSystemMenuBar property to the inspector, so far it is hidden for some reason. However, with the fix from #405, it might be possible to add it and use it.

@Oliver-Loeffler
Copy link
Collaborator

Once the proposed fix gets accepted, we can start a new issue for the useSystemMenuBar property in the inspector panel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
3 participants