From 979e5aacd36f44b095426cd07e50eb77e85b50f2 Mon Sep 17 00:00:00 2001 From: lukefromdc Date: Sat, 27 Feb 2016 02:02:14 -0500 Subject: 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. --- mate-panel/panel-widget.c | 3 +++ 1 file changed, 3 insertions(+) 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); -- cgit v1.2.1