menu items are stretched instead of scaled

Bug #12068 reported by Cms-ruinedsoft
8
Affects Status Importance Assigned to Milestone
gnome-panel (Ubuntu)
Fix Released
Medium
Sebastien Bacher

Bug Description

To reproduce: Switch to a theme that involves a stock file that doesn't have a
1x1 aspect ratio. Gorilla, for example, has non-square directory icons. Instead
of scaling the stock directory images appropriately to fit in the Places menu
for nautilus bookmarks (as an example, it could happen anywhere), the images are
stretched disproportionately. Screenshot will be attached.

I think this is due to a relatively small bug in gnome panel's
panel_load_menu_image_deferred function in menu.c. I will attach a patch against
CVS I think will fix the issue--I have been unable to compile it locally for
testing from a lack of the current libgnome-menu package.

I haven't reported this upstream but it probably should be.

http://bugzilla.gnome.org/show_bug.cgi?id=164874: http://bugzilla.gnome.org/show_bug.cgi?id=164874

Revision history for this message
Cms-ruinedsoft (cms-ruinedsoft) wrote :

Created an attachment (id=1079)
sample image mess up

Revision history for this message
Cms-ruinedsoft (cms-ruinedsoft) wrote :

Created an attachment (id=1080)
patch against cvs

Revision history for this message
Cms-ruinedsoft (cms-ruinedsoft) wrote :

On second analysis it seems this goes much deeper. My patch won't do anything.
Nevermind.

This could possibly be a bug with gtk+ as (I think) menu icons are created with
gtk_image_set_from_stock and the pixbufs/images returned are stretched instead
of scaled. Or this could be the result of the icon factory used for the menu.

Revision history for this message
Cms-ruinedsoft (cms-ruinedsoft) wrote :

Created an attachment (id=1098)
working fix

This patch works against the cvs and the ubuntu package versions.

Revision history for this message
Cms-ruinedsoft (cms-ruinedsoft) wrote :

Created an attachment (id=1099)
final patch

Small memory problem.
Submitting this to gnome bugzilla.

Revision history for this message
Cms-ruinedsoft (cms-ruinedsoft) wrote :
Revision history for this message
Sebastien Bacher (seb128) wrote :

thanks for the patch, I'm waiting for upstream comments on it.

Revision history for this message
Sebastien Bacher (seb128) wrote :

the upstream have included the fix in the new version:

gnome-panel (2.9.90-0ubuntu1) hoary; urgency=low

  * New upstream release:
    - fix scaling of icons in the menu to respect the ratio (Hoary: #5671).

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.