RPTools/TokenTool

MacOS: Menubar is on dialog when it should be at top of screen

Azhrei opened this issue · 4 comments

Describe the bug
The Swing MenuBar is anchored to the top of the window by default, but on macOS is should be attached to the top of the screen.

To Reproduce
Steps to reproduce the behavior:

  1. Open the application on a Mac
  2. Notice where the menu appears.

Expected behavior
Menu should be at the top of the screen.

TokenTool Info

  • Version: 2.1-rc.3

Desktop (please complete the following information):

  • OS: macOS
  • Version 10.14 (tested, but applies to all versions)

Additional context
MapTool has similar code, I believe in AppMenuBar.java

Looks like there is a useSystemMenuBarProperty. Would have to add that to the controller init as we use fxml.

Even with that, it still is a little funky I guess from what i am reading. Not sure if it's better with Java 10 or 11. Be curious how it works with this using 11...

Need confirmation that this is still happening with TT 2.2.

This is still happening.

I remember there were a few things different about the menu bar in MapTool — the position of the About and Quit menu options come to mind, and I think the menubar property. Comparing the code against MT is probably the way to go.

Too bad.

Just a note that TT is straight JavaFX for the UI as far as I know so Jamz's comment about useSystemMenuBarProperty may be the fix.

https://openjfx.io/javadoc/14/javafx.controls/javafx/scene/control/MenuBar.html