[Xfce-bugs] [Bug 1516] New: libxfcegui4: Cropped icons - GtkIconTheme icon scaling behaviour

bugzilla-daemon at xfce.org bugzilla-daemon at xfce.org
Mon Feb 27 17:34:40 CET 2006


Do NOT reply to this email.  To make further comments on this bug, use
the URL below:
http://bugzilla.xfce.org/show_bug.cgi?id=1516

           Summary: libxfcegui4: Cropped icons - GtkIconTheme icon scaling
                    behaviour
           Product: Xfce
           Version: 4.3.x (SVN trunk)
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: trivial
          Priority: Medium
         Component: general
        AssignedTo: xfce-bugs at xfce.org
        ReportedBy: xfce-bug at sstuhr.dk


I have a 25 pixel height panel, and the icons in the showdesktop and clipman
plugins and sometimes launchers too are cropped.

The reason seems to be that gtk_icon_theme_load_icon() (which is used in
xfce_themed_icon_load()) not always scale the returned GdkPixbuf. E.g. it
doesn't seem to always be the case with the Tango icon theme, at small icon sizes.

- From
http://developer.gnome.org/doc/API/2.0/gtk/GtkIconTheme.html#gtk-icon-theme-load-icon:
"size : 	 the desired icon size. The resulting icon may not be exactly this
size; see gtk_icon_info_load_icon()."

- If we look at gtk_icon_info_load_icon():
"Renders an icon previously looked up in an icon theme using
gtk_icon_theme_lookup_icon(); the size will be based on the size passed to
gtk_icon_theme_lookup_icon(). Note that the resulting pixbuf may not be exactly
this size; an icon theme may have icons that differ slightly from their nominal
sizes, and in addition GTK+ will avoid scaling icons that it considers
sufficiently close to the requested size or for which the source image would
have to be scaled up too far. (This maintains sharpness.)"

So the problem is, sometimes the GdkPixbuf returned by
gtk_icon_theme_load_icon() is too big, and it will have to be scaled down before
it gets returned by xfce_themed_icon_load().

Reproducible: Always
Steps to Reproduce:

-- 
Configure bugmail: http://bugzilla.xfce.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the Xfce-bugs mailing list