Proper macOS menus compatible with Gtk3 and future proof for Gtk4 #93
Replies: 3 comments 16 replies
-
If you've based your app on GApplication as recommended by the migration guide and GMenuModel it should Just Work. |
Beta Was this translation helpful? Give feedback.
-
Thanks, we are getting there now. Properly showing the menus now (though no item is yet working for some reason. A mistake I noticed in gtk3-demo-application and gtk4-demo-application:
I filed an issue for that at https://gitlab.gnome.org/GNOME/gtk/-/issues/6524 |
Beta Was this translation helpful? Give feedback.
-
So we've successfully ported from Gtkmenu to Gmenu on Gtk3 with proper macOS menubar menus.
These are not criticism of the way it is handled, I just wasn't able to find that information easily (or didn't know where to look - I'm sure it's somewhere and I'll slap my face when I see it) and ended up piecing the puzzle together by looking at the menu xmls of Gimp and Inkscape. The hardcoded action names surprised me, though :)
that was fixed by switching from app_group to application |
Beta Was this translation helpful? Give feedback.
-
We are slowly porting our Gtk3 project Exult Studio from Gtkmenu to Gmenu and are preparing to eventually port to Gtk4 (mostly waiting for Drag and drop on macOS to work properly - last time it still had problems with the demo).
So far we do not have "proper" macOS menus, just the menu bar of the application, not using the macOS menu bar.
Looking into it we hit some roadblocks:
And then I'm reading that there won't be a normal menu anymore in Gtk4? I'm very confused :)
Trying to find examples for Gtk3 applications on macOS without using gtk-mac-integration proved futile. Is there any example?
Edit: disregard mostly. Inkscape is another example besides Gimp 2.99 preview of a Gtk3 app without gtk-mac-integration but proper macOS menu.
On the Gtk4 side, I found that the demo "Application Class" also shows the proper menu on macOS.
Beta Was this translation helpful? Give feedback.
All reactions