I have a program that runs on both MacOS and Windows. I want to put the About menu in the correct location but can’t figure out how to do the move. As code, when the app runs, I have
#if TargetMacOS then
// put the about where it belongs on a mac
#elseif TargetWindows then
// put the menu at the end of the menubar like windows does
#endif
I’ve tried the Language Reference, but can’t find anything. It is probably me using the wrong search criteria.
Set the superclass on the About menu item to “AppleMenuItem” and it will automatically move to the right spot on macOS. There’s also a “PrefsMenuItem” to tag your preferences.
For the About item, you’ll want to use AppleMenuItem. PrefsMenuItem will both move the menu item to the program menu and assign the standard Command-, shortcut.
Here’s what it looks like with the program running from the first screenshot. The menu item that shows up as “General Settings” here has the PrefsMenuItem superclass. The “About OpenSong” menu item has AppleMenuItem as its superclass.