How menu in GTK4 look like

Since GtkMenu is gone in GTK4 and there is no screenshots in the documentation of its replacement - are menu in GTK4 application will look like the menu on the Android? Where you have a menu button, you click on it and then the menu shows up. Or something like the menu in the text editor standard GNOME application.

Thank you.

Yes, menus are done like in Text Editor. The HIG has an overview of how to do menus: Menus - GNOME Human Interface Guidelines documentation

Most apps with a headerbar have the hamburger button in the top right that opens the primary menu. Maybe another button for a secondary menu, like in Text Editor and Files you have a button to the left of the hamburger button for changing view options.

I wonder who made tgis decision.
GTK is not mobile development platform and doing the menu like this…

Seems silly at best.

But it looks like its done and will not be revereted i just hope nobody else will follow. :slight_smile:

Thank you.

BTW, it would be nice to have a screenshot in the documentation of how it looks like on different versions. Then people will decide whether to upgrade or not.

BTW2, im also curious who says the menu “should contain X to Y number of items”. Again GTK is not a primary platform for mobile development. But i guess the devs want it to be?

Does it matter who decides what? It does not sound like the kind of question that would matter to anybody. What for? (It is a rhetorical question, I understand you only want to vent some frustration).

Anyhow, I am pretty sure you can search for “How Many Items in a Navigation Menu?” and get several answers. I has nothing to do with mobile, as research about this predates it, and the results have not changed over time. Also, previous versions of HIG also contained such recommendation which goes as back as GNOME 2.

The migration guide contains information how to port old Widget to the ones already existing since Gtk3. If you follow the link to GtkPopover you can see how it looks like in isolation. Also, searching on Internet for GtkPopover should give you enough screenshots.


What I meant to say is that every application is different and if in a “normal” application (with menu bar and popup menus) I can have many menus I will not be able to in this design as it will look weird at best. (That’s probably the reason why mobile applications have this design).

As an example - in the application I’m currently writing I will have a menu bar with a menu. When I open this menu the popup menu will be displayed. One of the submenus there will have another submenu with 4 checkboxes.

I can’t even imagine how it will look like in the GTK4… :wink:

From the documentation:

But there is no screenshot of the GtkPopoverMenu on its page.

And since according to the docs it is explicitly used for the menus…

You get the idea.

Thank you.

If you want a menu bar, you want GtkPopoverMenuBar. A GtkPopoverMenu is just a GtkPopover built out of a GMenu.

Who said this? GTK is (IMHO) the best development platform for mobile devices like phones.

This topic was automatically closed 45 days after the last reply. New replies are no longer allowed.