summaryrefslogtreecommitdiff
path: root/libmate-desktop
diff options
context:
space:
mode:
authorraveit65 <[email protected]>2016-10-17 10:03:05 +0200
committerraveit65 <[email protected]>2016-10-18 11:02:07 +0200
commit8114e9dd3f1c80093d381faacf0452e5ea3f0448 (patch)
treeea99e3817ad2d73113c35aa82179973ae5535089 /libmate-desktop
parent234fd680cac5df6864a443b58b4f88904d5050c2 (diff)
downloadmate-desktop-8114e9dd3f1c80093d381faacf0452e5ea3f0448.tar.bz2
mate-desktop-8114e9dd3f1c80093d381faacf0452e5ea3f0448.tar.xz
GTK+-2: fix fontcolor for dark bg in caja
Fixes https://github.com/mate-desktop/mate-desktop/issues/237
Diffstat (limited to 'libmate-desktop')
-rw-r--r--libmate-desktop/mate-bg.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libmate-desktop/mate-bg.c b/libmate-desktop/mate-bg.c
index 5f28dde..e8c198a 100644
--- a/libmate-desktop/mate-bg.c
+++ b/libmate-desktop/mate-bg.c
@@ -1327,9 +1327,15 @@ mate_bg_is_dark (MateBG *bg,
g_object_unref (pixbuf);
}
+#if GTK_CHECK_VERSION (3, 0, 0)
intensity = ((guint) (color.red * 65535) * 77 +
(guint) (color.green * 65535) * 150 +
(guint) (color.blue * 65535) * 28) >> 16;
+#else
+ intensity = (color.red * 77 +
+ color.green * 150 +
+ color.blue * 28) >> 16;
+#endif
return intensity < 160; /* biased slightly to be dark */
}