Bug 310710 - cropped gnome-main-menu icon and label
Summary: cropped gnome-main-menu icon and label
Status: RESOLVED FIXED
: 301695 (view as bug list)
Alias: None
Product: openSUSE 11.0
Classification: openSUSE
Component: GNOME (show other bugs)
Version: Beta 1
Hardware: i686 openSUSE 10.3
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: Federico Mena Quintero
QA Contact: E-mail List
URL:
Whiteboard: gnome-wrong-out-of-the-box
Keywords:
Depends on:
Blocks: main-menu-behavior
  Show dependency treegraph
 
Reported: 2007-09-14 20:09 UTC by Forgotten User loSYVQXuwD
Modified: 2008-05-06 00:00 UTC (History)
3 users (show)

See Also:
Found By: Other
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
Screenshot (2.64 KB, image/png)
2007-09-14 20:11 UTC, Forgotten User loSYVQXuwD
Details
gtk2-bnc310710-underallocated-gtklabel-position.diff (1.37 KB, patch)
2007-12-18 02:40 UTC, Federico Mena Quintero
Details | Diff
screenshot in 11.0 (190.24 KB, image/png)
2007-12-19 06:27 UTC, Scott Reeves
Details
screenshot with patched gtk2 (1.47 KB, image/png)
2008-01-12 03:03 UTC, Forgotten User loSYVQXuwD
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Forgotten User loSYVQXuwD 2007-09-14 20:09:39 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.
Comment 1 Forgotten User loSYVQXuwD 2007-09-14 20:11:34 UTC
Created attachment 164151 [details]
Screenshot
Comment 2 Mark Gordon 2007-09-14 20:21:04 UTC
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.
Comment 3 Dean Sawash 2007-09-15 05:31:52 UTC
same problem here, actually it only looks proper with Gilouche enabled!
Comment 4 JP Rosevear 2007-11-14 20:22:42 UTC
*** Bug 301695 has been marked as a duplicate of this bug. ***
Comment 6 Federico Mena Quintero 2007-12-18 01:31:29 UTC
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.
Comment 7 Federico Mena Quintero 2007-12-18 02:03:19 UTC
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).
Comment 8 Federico Mena Quintero 2007-12-18 02:40:58 UTC
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.
Comment 9 Federico Mena Quintero 2007-12-18 22:12:17 UTC
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.
Comment 10 Scott Reeves 2007-12-19 06:27:29 UTC
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.
Comment 11 Forgotten User loSYVQXuwD 2008-01-12 03:03:18 UTC
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.
Comment 12 Federico Mena Quintero 2008-03-24 21:47:19 UTC
The patch is now sent upstream at http://bugzilla.gnome.org/show_bug.cgi?id=524166
Comment 13 Federico Mena Quintero 2008-05-05 23:58:19 UTC
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.
Comment 14 Forgotten User loSYVQXuwD 2008-05-06 00:00:53 UTC
This fixes the label, but not the icon, right?