summaryrefslogtreecommitdiff
path: root/src/xfdesktop-icon-view.c
diff options
context:
space:
mode:
authorEric Koegel <eric.koegel@gmail.com>2017-04-19 09:20:47 +0300
committerEric Koegel <eric.koegel@gmail.com>2017-04-19 18:45:44 +0300
commitdb2337d1ff94830e4b9eb62fb84c40e4e1b7017c (patch)
tree4ac31c125f8ed5bd121197e06f30a6617e5adbc5 /src/xfdesktop-icon-view.c
parent5cb865ace179c43af9e0cf0559b4aced308b4ab3 (diff)
downloadxfdesktop-db2337d1ff94830e4b9eb62fb84c40e4e1b7017c.tar.gz
Colorize the icon using style context
Diffstat (limited to 'src/xfdesktop-icon-view.c')
-rw-r--r--src/xfdesktop-icon-view.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/xfdesktop-icon-view.c b/src/xfdesktop-icon-view.c
index 387046db..5092bef8 100644
--- a/src/xfdesktop-icon-view.c
+++ b/src/xfdesktop-icon-view.c
@@ -2990,7 +2990,18 @@ xfdesktop_icon_view_paint_icon(XfdesktopIconView *icon_view,
GdkPixbuf *pix_free = NULL;
if(state != GTK_STATE_FLAG_NORMAL) {
- pix_free = exo_gdk_pixbuf_colorize(pix, &gtk_widget_get_style(widget)->base[state]);
+ GtkStyleContext *context;
+ GdkRGBA rgba;
+ GdkColor color;
+
+ context = gtk_widget_get_style_context(widget);
+ gtk_style_context_get_color(context, state, &rgba);
+
+ color.red = rgba.red * G_MAXUINT16;
+ color.green = rgba.green * G_MAXUINT16;
+ color.blue = rgba.blue * G_MAXUINT16;
+
+ pix_free = exo_gdk_pixbuf_colorize(pix, &color);
pix = pix_free;
}