dustinkredmond / FXTrayIcon

Tray Icon implementation for JavaFX applications. Say goodbye to using AWT's SystemTray icon, instead use a JavaFX Tray Icon.
MIT License
324 stars 25 forks source link

MenuItem order wrong for .addExitMenuItem() #50

Closed azplanlos closed 2 years ago

azplanlos commented 2 years ago

When building a Tray Icon using the Builder API and adding .addExitMenuItem() the exit menu item shows up on top of the list.

Check:

FXTrayIcon trayIcon =
            new FXTrayIcon.Builder(stage, resource).menuItem("Settings",
                    e-> myMethod()).separator().menuItem(item).addExitMenuItem().show().build();
EasyG0ing1 commented 2 years ago

@azplanlos - Yeah, this is been fixed in pull request #47 which has been merged, but not published yet...

Heres a screen shot from that PR:

Screen Shot 2022-05-11 at 2 47 58 AM
dustinkredmond commented 2 years ago

Closing this as @EasyG0ing1's commit fixed this. I've just been too busy to publish a release. I will publish the next release with this fix later this evening. Thank you both for bringing this to my attention.