After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 636691 - Rendering icons with prelight state doesn't take any effect
Rendering icons with prelight state doesn't take any effect
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: Other
2.91.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2010-12-07 11:22 UTC by Carlos Garcia Campos
Modified: 2011-01-15 04:52 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Carlos Garcia Campos 2010-12-07 11:22:24 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().
Comment 1 Carlos Garcia Campos 2010-12-09 08:50:56 UTC
If we agree on using colorshift_pixbuf() instead of gdk_pixbuf_saturate_and_pixelate() I'll write a patch.
Comment 2 Carlos Garcia Campos 2011-01-14 09:55:47 UTC
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.)
Comment 3 Matthias Clasen 2011-01-14 17:27:02 UTC
I guess it would make sense to make this available in gdk-pixbuf