After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 485754 - Add a way to specifiy a minimum menu item height
Add a way to specifiy a minimum menu item height
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkMenu
2.12.x
Other Linux
: Normal minor
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2007-10-11 14:55 UTC by Benjamin Berg
Modified: 2016-06-08 04:21 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Benjamin Berg 2007-10-11 14:55:02 UTC
In the sugar theme there are a lot of fixed sizes. One example are menu items, that should always be 45 pixel high. It is impossible to achieve this, as all the different menu items will get different sizes. (Menu item with and without image,  cell rendere menu item, and what not.)

To make it possible to get a consistent menu item height in menus a style property for the minimum height could be added to either the menu, or the menu item.
I think that a style property on GtkMenu (or maybe GtkMenuShell) would make most sense, as the sizing can be handled easily in the menu class then.

Does this sound good?
Comment 1 Benjamin Berg 2007-10-13 18:48:24 UTC
I just realized that it may be desirable to make the separator and tear off menu items smaller than the rest. To achieve this the style property has to be part of the menu item, and not the menu.
Though the logic to use it should probably still go into the menu.
Comment 2 Matthias Clasen 2007-10-16 18:15:04 UTC
I'm not convinced that a style property is right here. You really want something that depends on the font size. In most cases, a size group should be able to fix this problem.
Comment 3 Benjamin Berg 2007-10-16 19:12:50 UTC
Hm, true, a size group would fix the problem in most cases. But I am not convinced that depending on the font size makes sense here. As the icons are usually larger than the font, a minimum height would depend on the icon size. And the icon size (as many other things) is fixed ...

About size groups. A similar effect could be done in the menu by forcing an homogeneous height over all menu items.
Comment 4 Matthias Clasen 2016-06-08 04:21:12 UTC
This is possible in gtk3 nowadays, with css min-height