summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGyörgy Balló <[email protected]>2015-12-16 12:19:33 +0100
committermonsta <[email protected]>2015-12-17 13:57:39 +0300
commit5b859fd0eb1dbbfca129f80828de4741a9f900b4 (patch)
tree09f1f28d688d29ba1d49fcb6c5d39cc5242d846a
parent6182a8e0e33e1bdf7e7fcee906321e91ca243a0e (diff)
downloadmate-panel-5b859fd0eb1dbbfca129f80828de4741a9f900b4.tar.bz2
mate-panel-5b859fd0eb1dbbfca129f80828de4741a9f900b4.tar.xz
GTK3 workspace-switcher: add fallback color
Without setting a color, the actual workspace is not highlighted, if the theme does not set WnckPager:selected explicitely (e.g. with Adwaita).
-rw-r--r--applets/wncklet/workspace-switcher.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/applets/wncklet/workspace-switcher.c b/applets/wncklet/workspace-switcher.c
index 945a87c5..be086648 100644
--- a/applets/wncklet/workspace-switcher.c
+++ b/applets/wncklet/workspace-switcher.c
@@ -489,6 +489,9 @@ gboolean workspace_switcher_applet_fill(MatePanelApplet* applet)
GtkActionGroup* action_group;
gchar* ui_path;
gboolean display_names;
+#if GTK_CHECK_VERSION (3, 0, 0)
+ GtkCssProvider *provider;
+#endif
pager = g_new0(PagerData, 1);
@@ -543,6 +546,17 @@ gboolean workspace_switcher_applet_fill(MatePanelApplet* applet)
pager->wm = PAGER_WM_UNKNOWN;
wnck_pager_set_shadow_type(WNCK_PAGER(pager->pager), GTK_SHADOW_IN);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ provider = gtk_css_provider_new ();
+ gtk_css_provider_load_from_data (provider,
+ "WnckPager:selected {\n"
+ "background-color: #4A90D9; }",
+ -1, NULL);
+ gtk_style_context_add_provider (gtk_widget_get_style_context (pager->pager),
+ GTK_STYLE_PROVIDER (provider),
+ GTK_STYLE_PROVIDER_PRIORITY_FALLBACK);
+ g_object_unref (provider);
+#endif
g_signal_connect(G_OBJECT(pager->pager), "destroy", G_CALLBACK(destroy_pager), pager);
gtk_container_add(GTK_CONTAINER(pager->applet), pager->pager);