Open maaku opened 1 year ago
This is because of how the menubar MenuSpec
is currently being made, it creates a menu with APP_NAME
as it's title, then a menu with no title and then that blank named submenu this looks like this in the code:
│
└───── Menu("AtomCAD") 🔴
└───── SubMenu("") Acts as a pop-up window on MacOS) 🔵
├── Services
├── Separator
├── Hide atomCAD
├── Hide Others
└── Show All
Current MacOS menubar:
On MacOS the root menu (🔴) is an entry in the menubar and the blank-named menu (🔵) serves as a pop-up.
Current Windows menubar:
On windows the root menu (🔴) is the menubar and the blank-named submenu (🔵) is an item on the menubar, the core issue is the MenuSpec
type is adds a blank menu to support MacOS.
There are two possible solutions:
I reimplemented the MacOS menu using muda while working on #21 and it looked like this:
The new menu would look like:
│
├─── AtomCAD (MacOS-specific stuff added in the macos platform_impl)
│ ├── Services
│ ├── Separator
│ ├── Hide atomCAD
│ ├── Hide Others
│ └── Show All
├─── File
│ ├── New
│ ├── Open File
│ ├── Separator
│ ├── Settings... (CMD ,)
│ ├── Separator
│ └── Quit atomCAD (CMD Q)
├─── Window
│ └── Minimize (CMD H)
└── Help
└── About atomCAD
tldr: I didn't modify the default MenuSpec
when implementing the windows menubar because that would require changes in the MacOS menubar and that would have been out of scope for that issue.
@maaku @ch1n3du is it still relevant?
I don't think so, I made a change that fixed the issue but since @maaku has ported the project to Bevy I don't think there's a windows menubar yet and with Bevy there's probably a better solution.
It is still relevant. When we switched from our own framework to bevy, most of the codebase changed. In particular we lost control over the main message loop, so whatever mechanism we use for adding application menus will probably be different. We will need it though, so this issue remains open.
When I tried the new menubar code on my windows system, I got a blank menubar. There is a menu attached to the window, as I see a beige ribbon across the top. However the ribbon is featureless: there's no menus to click on. I'll post screenshots when I'm back at that machine. I have not yet had time to investigate this any further.
Pinging @ch1n3du