summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWolfgang Ulbrich <[email protected]>2016-01-31 03:25:28 +0100
committerWolfgang Ulbrich <[email protected]>2016-01-31 03:25:28 +0100
commit5b56a80e6d57e2d4d1236dfcd7683f377d29bb5c (patch)
tree7f12fb450a0604c7097a5733aa7cb196c9ec80aa
parenta255e7eb1e1951e699ae833f9816892f6e09177f (diff)
downloadcaja-5b56a80e6d57e2d4d1236dfcd7683f377d29bb5c.tar.bz2
caja-5b56a80e6d57e2d4d1236dfcd7683f377d29bb5c.tar.xz
GTK3 desktop: add a caja-desktop style class to the desktop canvas
So that themes can tweak the color/background of desktop canvas items separately. taken from: https://git.gnome.org/browse/nautilus/commit/?id=8b676a6
-rw-r--r--libcaja-private/caja-icon-container.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/libcaja-private/caja-icon-container.c b/libcaja-private/caja-icon-container.c
index 1b77db00..bf00743b 100644
--- a/libcaja-private/caja-icon-container.c
+++ b/libcaja-private/caja-icon-container.c
@@ -9659,6 +9659,15 @@ caja_icon_container_set_is_desktop (CajaIconContainer *container,
g_return_if_fail (CAJA_IS_ICON_CONTAINER (container));
container->details->is_desktop = is_desktop;
+
+#if GTK_CHECK_VERSION (3, 0, 0)
+ if (is_desktop) {
+ GtkStyleContext *context;
+
+ context = gtk_widget_get_style_context (GTK_WIDGET (container));
+ gtk_style_context_add_class (context, "caja-desktop");
+ }
+#endif
}
void