GNOME Bugzilla – Bug 742907
[PATCH] GMenuModel submenu icons
Last modified: 2018-05-02 16:22:05 UTC
Created attachment 294510 [details] [review] Submenu icons patch gmenumodel I create a 1-line patch that cause GtkMenuShell submenus to reflect GMenuModel icon property. Can it be merged? I think GMenuModel submenus is not sections and it can be nouns.
not in favour of that. icons on submenus are unusual.
Icons in submenus can be used for: 1. Implementation of system menu (main menu) 2. Implementation of window list 3. Implementation of user changeable menu. What cons against it?
Created attachment 294577 [details] Example of icons in submenus via this patch.
(In reply to comment #3) > Created an attachment (id=294577) [details] > Example of icons in submenus via this patch. you may have noticed that we don't do that kind of menu any more… (In reply to comment #2) > Icons in submenus can be used for: > 1. Implementation of system menu (main menu) > 2. Implementation of window list > 3. Implementation of user changeable menu. > > What cons against it? you listed three scenarios that we actively avoid, these days.
(In reply to comment #4) > you may have noticed that we don't do that kind of menu any more… This is from my LXPanel fork. > you listed three scenarios that we actively avoid, these days. I know, that you want to avoid these scenarios for GNOME, but for other GTK desktop environments (MATE, for example, or XFCE) it is valid usecases for GtkMenu. I think possibility for doing this should be remain from GtkImageMenuItem. Or, at least, if you actively con against this kind of menus, note it in docs (not in GNOME HIG, but in GTK+ docs, for non-GNOME GTK developers). For me it was a badly surprise...
Created attachment 294587 [details] Another example of possible usage of submenu icons. New from template submenu. It is rare, but possible.
Next example: Paste as menu. Examples of this menu can be found in LibreOffice. And it is good to have it with edit-paste icon.
Ok, another reason. Popovers can have icons in submenu headers. In gtkmenusectionbox, line 408 we can see: g_object_bind_property (item, "icon", button, "icon", G_BINDING_SYNC_CREATE); Then menu and popover with same model will be different, which is not good, I think. I will provide an example screenshot soon.
Created attachment 294748 [details] Simple example of different menumodel rendering in menus and popovers Same model is rendered differently, when attached to menu and to popover.
Another possible usage of submenu icons - reimplementing Gnome Shell application menu via GtkMenuBar.
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gtk/issues/525.