GNOME Bugzilla – Bug 636691
Rendering icons with prelight state doesn't take any effect
Last modified: 2011-01-15 04:52:45 UTC
GtkThemingEngine (and GtkStyle before) uses gdk_pixbuf_saturate_and_pixelate() to render icons when prelight flag is present, but I have tried with everal icons and I don't see any difference between the normal and prelight icons. I've noticed that gtkentry uses another approach (it seems to be the same used in gnome-panel) that works with all icons I've tried so far. So, I don't know why gdk_pixbuf_saturate_and_pixelate() doesn't work, but we could use the colorshift_pixbuf() method from gtkentry and make gtkentry use gtk_render_icon_pixbuf().
If we agree on using colorshift_pixbuf() instead of gdk_pixbuf_saturate_and_pixelate() I'll write a patch.
GtkEntry resets widgets state flags before calling gtk_widget_render_icon_pixbuf() so it would still need to call colorshift_pixbuf() by itself. So maybe we can just move this method to a common place and use it from both GtkThemingEngine and GtkEntry. Or we can move it to gdk-pixbuf since it's actually used in my other apps with similar implementations (gnome-panel, nautilus uses eel_gdk_pixbuf_lighten() from libeel, etc.)
I guess it would make sense to make this available in gdk-pixbuf