GNOME Bugzilla – Bug 163887
Menu items don't have equal *minimum* height
Last modified: 2018-02-10 03:38:05 UTC
A menu item with a stock icon will usually be a few pixels higher than a menu item without. This looks ugly. (This is using the action stuff)
Do you have a screenshot ?
Created attachment 35961 [details] Screenshot
As a workaround, you could use a fully transparent image of the right height for the image-less menu items.
This won't work for check and radio menu items though.
Created attachment 62364 [details] [review] suggested patch to gtkmenuitem.c This suggested patch forces minimum menu item height based on GTK_ICON_SIZE_MENU. Menu bars are excluded from being affected.
You need to use gtk_icon_size_lookup_for_settings() to be multihead-safe
Created attachment 63771 [details] [review] revised patch From the Zaphod Beeblebrox department - multihead-safe patch
Patch 63771 applies cleanly. Reviewing it would take little time. (Working on http://mail.gnome.org/archives/gtk-devel-list/2007-March/msg00148.html)
instead of keep asking the theme for the size, the GtkMenuItem should just ask it on GtkWidget::style-set and GtkWidget::screen-changed and cache the value. I'll work on a patch doing this.
mmh, just realised that MenuItem doesn't have any private data to use for the cache, and adding a private structure for an integer is a waste of space. so, I guess the patch will have to do.
*** Bug 465959 has been marked as a duplicate of this bug. ***
PING!
Bug 485754 which I opened some time ago is about the same issue.
I can't reproduce with 2.12. Closing obsolete. Reopen if you have an updated screenshot.
Created attachment 109356 [details] Gtk 2.12.9-3 from Debian Screenshot of gimp and evolution.
Weird... I can't reproduce, updating version from your comment. Maybe it's your font? I'm using Droid Sans as font, you seem to be using something simpler (nimbus?).
It is simple. My font is smaller than icon. And menu item height is set by the tallest thing in this menu item. Your tallest thing is text and the text has allways same height. My tallest thing is icon, or text if there is no icon. But heights of text and icon aren't same... And I'm using very old font called Helvetica.
Aha!. Thanks for the clarification. Then it means that the patch is useful :). I'll update the wiki. I added the *minimum* word to the summary.
But when menu item has minimum larger than minimal, it is not minimum any more :)
We're moving to gitlab! As part of this move, we are closing bugs that haven't seen activity in more than 5 years. If this issue is still imporant to you and still relevant with GTK+ 3.22 or master, please consider creating a gitlab issue for it.