TokenTool icon indicating copy to clipboard operation
TokenTool copied to clipboard

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

Open Azhrei opened this issue 5 years ago • 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

Azhrei avatar Mar 31 '19 02:03 Azhrei

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...

JamzTheMan avatar Mar 31 '19 03:03 JamzTheMan

Need confirmation that this is still happening with TT 2.2.

Phergus avatar Jul 12 '21 17:07 Phergus

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.

Azhrei avatar Jul 14 '21 06:07 Azhrei

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

Phergus avatar Jul 14 '21 15:07 Phergus