summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--applets/wncklet/showdesktop.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/applets/wncklet/showdesktop.c b/applets/wncklet/showdesktop.c
index f336fd95..3733ced5 100644
--- a/applets/wncklet/showdesktop.c
+++ b/applets/wncklet/showdesktop.c
@@ -410,10 +410,8 @@ gboolean show_desktop_applet_fill(MatePanelApplet* applet)
gchar* ui_path;
AtkObject* atk_obj;
#if GTK_CHECK_VERSION (3, 0, 0)
-#if !GTK_CHECK_VERSION (3, 19, 0)
GtkCssProvider *provider;
#endif
-#endif
mate_panel_applet_set_flags(applet, MATE_PANEL_APPLET_EXPAND_MINOR);
@@ -444,8 +442,20 @@ gboolean show_desktop_applet_fill(MatePanelApplet* applet)
gtk_widget_set_name (sdd->button, "showdesktop-button");
#if GTK_CHECK_VERSION (3, 0, 0)
-#if !GTK_CHECK_VERSION (3, 19, 0)
provider = gtk_css_provider_new ();
+#if GTK_CHECK_VERSION (3, 20, 0)
+ gtk_css_provider_load_from_data (provider,
+ "#showdesktop-button {\n"
+ "border-width: 0px; \n" /*a border here causes GTK warnings */
+ " padding: 0px;\n"
+ " margin: 0px; }",
+ -1, NULL);
+
+ gtk_style_context_add_provider (gtk_widget_get_style_context (sdd->button),
+ GTK_STYLE_PROVIDER (provider),
+ GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
+ g_object_unref (provider);
+#else
gtk_css_provider_load_from_data (provider,
"#showdesktop-button {\n"
" -GtkWidget-focus-line-width: 0px;\n"