summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlukefromdc <[email protected]>2016-02-27 02:02:14 -0500
committerraveit65 <[email protected]>2016-02-27 12:08:43 +0100
commit979e5aacd36f44b095426cd07e50eb77e85b50f2 (patch)
treeaddb1be32184fcc4ed7068859137beae70b14608
parent0fef6a917e9f60c52d0e4fb5b0d5ef9f8371a5f7 (diff)
downloadmate-panel-979e5aacd36f44b095426cd07e50eb77e85b50f2.tar.bz2
mate-panel-979e5aacd36f44b095426cd07e50eb77e85b50f2.tar.xz
GTK3.20: preserve default background
Add back the default background for themes such as Adwaita that do not explicitly support MATE. Tested with custom and system themes in Adwaita and all themes I have. System themes work perfectly, custom themes require restarting panel after any theme change, still need to restart panel after returning to the system theme from a custom theme as well.
-rw-r--r--mate-panel/panel-widget.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/mate-panel/panel-widget.c b/mate-panel/panel-widget.c
index 6060524b..4830cdc8 100644
--- a/mate-panel/panel-widget.c
+++ b/mate-panel/panel-widget.c
@@ -1648,6 +1648,9 @@ panel_widget_set_background_default_style (GtkWidget *widget)
context = gtk_widget_get_style_context (widget);
state = gtk_widget_get_state_flags (widget);
background = &PANEL_WIDGET (widget)->background;
+#if GTK_CHECK_VERSION (3, 19, 0)
+ gtk_style_context_add_class(context,GTK_STYLE_CLASS_BACKGROUND);
+#endif
gtk_style_context_add_class(context,"gnome-panel-menu-bar");
gtk_style_context_add_class(context,"mate-panel-menu-bar");
panel_background_apply_css (&PANEL_WIDGET (widget)->background, widget);