|
Recently, I had worked on a patch to fix the scaling of icons, in resapplet.
I just filed a bug, and submitted that patch upstream, as well, as
#407523.
This patch implements the following algorithm, and removes the block of code
that would call gdk_pixbuf_scale_simple to scale the image down a pixel or
two in most cases:
+ if (panel_h < 22)
+ icon_size = 16;
+ else if (panel_h >= 22 && panel_h < 32)
+ icon_size = 22;
+ else if (panel_h >= 32 && panel_h < 48)
+ icon_size = 32;
+ else if (panel_h >= 48)
+ icon_size = panel_h;
This is basically The Right Way (TM) to do icon size selection for panel
applets. If all applets did things this way, then the icon sizes would be the
same for all applets on a panel. It would also mean that we could guarantee
sharpness for reasonable panel sizes.
Jakub asked me to blog about this,
so developers, fix your applets. Panel applets and tray icons are also not
the only places where this makes sense. Anywhere that you may need to scale
icons to fill different allocation sizes for widgets, it makes sense to use
this algorithm.
|