[Goodies-commits] r3845 - xfce4-fsguard-plugin/trunk/panel-plugin

Brian J. Tarricone bjt23 at cornell.edu
Thu Jan 24 11:33:42 CET 2008


On Thu, 24 Jan 2008 11:25:48 +0100 mmassonnet at gmail.com wrote:

> And this is driving me nuts.  I can't figure out, but it seems that
> if I use an icon from the gtk-stock-items it applies some GTK+ rules
> as described in gtk_icon_info_load_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.)"
> Great for the sharpness, but at some sizes of the panel the top/lower
> part misses one or two pixels.  And if I add some extra sizes it still
> renders at the same size.  Somehow icons that aren't from the
> gtk-stock-items seem to be rendered at a perfect size.

Argh, yes, I recall that.  I don't remember what you can do for stock
icons; maybe look at gtk_widget_render_icon()?  I don't recall if
that's what I used.  Otherwise you can rescale the icon returned, but
that's ugly...

I wish there was a way to force the gtk icon code to scale the icon
regardless of original size.  Of course, with SVGs the problem goes
away (for the most part).

	-brian



More information about the Xfce4-dev mailing list