Bugzilla – Bug 310710
cropped gnome-main-menu icon and label
Last modified: 2008-05-06 00:00:53 UTC
The icon and the label of the 'Computer' menu looks like shifted down with some themes. I will attach a screenshot which was made using the Clearlooks theme.
Created attachment 164151 [details] Screenshot
Confirmed, more or less. It looks slightly worse for me. I can make it look better if I tweak my DPI settings (which explains why the appearance varies between machines), but that shouldn't be necessary.
same problem here, actually it only looks proper with Gilouche enabled!
*** Bug 301695 has been marked as a duplicate of this bug. ***
This happens when the panel is set to a size that is not tall enough to contain all of these: * "Computer" label * Focus padding for Computer button * Line width of focus rectangle * Button bevels When the panel is not tall enough to contain all of those, the Computer label gets painted slightly below the place where one would think it should be. Specifically, this happens in gtklabel.c:get_layout_location(), where it does y = floor (widget->allocation.y + (gint)misc->ypad + MAX (((widget->allocation.height - widget->requisition.height) * misc->yalign), 0)); This means the label will *always* paint the text below its allocated Y coordinate. I think it could push the text up a bit in case allocation.height < requisition.height; I'll discuss this with the GTK+ hackers.
This happens due to the patch introduced in http://bugzilla.gnome.org/show_bug.cgi?id=71742 --- that's the same as the current code except for a "0.5" which you can ignore (it was used incorrectly for rounding).
Created attachment 187976 [details] gtk2-bnc310710-underallocated-gtklabel-position.diff This patch for gtk2 fixes the bug for me. I'll test it for a little while to see if it breaks anything.
There is a test package for gtk2 in this repository: http://download.opensuse.org/repositories/home:/federico-mena:/10.3/openSUSE_10.3/ Please download it and see if it fixes the problem. You may need to log out and log back in for your main-menu to restart.
Created attachment 188166 [details] screenshot in 11.0 The updated gtk packages fixed this on my 10.3 box. Interestingly the icon is still clipped on my factory (11.0) box but where that is such an unstable mix I would think it's not worth investigating now, just make sure this still works once 11.0 becomes solid.
Created attachment 190321 [details] screenshot with patched gtk2 After installing the gtk2 package form the above repository on 10.3 the text looks good. The icon is still not fully visible.
The patch is now sent upstream at http://bugzilla.gnome.org/show_bug.cgi?id=524166
Moving to openSUSE 11.0. I just submitted the attached patch to autobuild; it should appear in Beta3. * Mon May 05 2008 - federico@novell.com - Added gtk2-bnc310710-bgo524166-underallocated-gtklabel-position.diff to fix https://bugzilla.novell.com/show_bug.cgi?id=310710 - Labels with too-small allocations should still pay attention to their alignment. This fixes a clipped "Computer" label in gnome-main-menu.
This fixes the label, but not the icon, right?