summaryrefslogtreecommitdiff
path: root/eel/eel-gdk-pixbuf-extensions.c
diff options
context:
space:
mode:
authorWolfgang Ulbrich <[email protected]>2016-01-13 15:15:35 +0100
committerWolfgang Ulbrich <[email protected]>2016-01-13 15:15:35 +0100
commit3b7b4cfa969402c5cc9e45369f552729f2b65308 (patch)
tree610589db57c82fb63f5984d28b3009eb2c0cbb5a /eel/eel-gdk-pixbuf-extensions.c
parent3c5a4ef68906a73850fa2ffe403cfcd37dc31ff9 (diff)
parent1befe8ddf08c12b5c926d269b31d270fb94b9c3e (diff)
downloadcaja-3b7b4cfa969402c5cc9e45369f552729f2b65308.tar.bz2
caja-3b7b4cfa969402c5cc9e45369f552729f2b65308.tar.xz
Merge pull request #498 from mate-desktop/dev-GtkStyleContext
port to gtk_style_context and other fixes
Diffstat (limited to 'eel/eel-gdk-pixbuf-extensions.c')
-rw-r--r--eel/eel-gdk-pixbuf-extensions.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/eel/eel-gdk-pixbuf-extensions.c b/eel/eel-gdk-pixbuf-extensions.c
index b4cd9394..bbbffc3a 100644
--- a/eel/eel-gdk-pixbuf-extensions.c
+++ b/eel/eel-gdk-pixbuf-extensions.c
@@ -1265,7 +1265,11 @@ eel_gdk_pixbuf_render (GdkPixbuf *pixbuf,
guint saturation,
guint brightness,
guint lighten_value,
+#if GTK_CHECK_VERSION(3,0,0)
+ GdkRGBA *color)
+#else
guint color)
+#endif
{
GdkPixbuf *temp_pixbuf, *old_pixbuf;
@@ -1277,19 +1281,27 @@ eel_gdk_pixbuf_render (GdkPixbuf *pixbuf,
else if (render_mode == 2)
{
/* colorize icon */
+#if GTK_CHECK_VERSION(3,0,0)
+ temp_pixbuf = eel_create_colorized_pixbuf (pixbuf, color);
+#else
temp_pixbuf = eel_create_colorized_pixbuf (pixbuf,
EEL_RGBA_COLOR_GET_R (color),
EEL_RGBA_COLOR_GET_G (color),
EEL_RGBA_COLOR_GET_B (color));
+#endif
}
else if (render_mode == 3)
{
/* monochromely colorize icon */
old_pixbuf = eel_create_darkened_pixbuf (pixbuf, 0, 255);
+#if GTK_CHECK_VERSION(3,0,0)
+ temp_pixbuf = eel_create_colorized_pixbuf (old_pixbuf, color);
+#else
temp_pixbuf = eel_create_colorized_pixbuf (old_pixbuf,
EEL_RGBA_COLOR_GET_R (color),
EEL_RGBA_COLOR_GET_G (color),
EEL_RGBA_COLOR_GET_B (color));
+#endif
g_object_unref (old_pixbuf);
}
else