[gnome-panel] notification-area: use correct style context state



commit bcff4d158beddb4bf82113b71201427bf411a88c
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Sun Dec 20 00:23:46 2015 +0200

    notification-area: use correct style context state

 applets/notification_area/main.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/applets/notification_area/main.c b/applets/notification_area/main.c
index 13a7a6d..56c212e 100644
--- a/applets/notification_area/main.c
+++ b/applets/notification_area/main.c
@@ -113,6 +113,9 @@ na_tray_applet_style_updated (GtkWidget *widget)
 
   context = gtk_widget_get_style_context (widget);
 
+  gtk_style_context_save (context);
+  gtk_style_context_set_state (context, GTK_STATE_FLAG_NORMAL);
+
   gtk_style_context_get_color (context, GTK_STATE_FLAG_NORMAL, &fg);
 
   if (!gtk_style_context_lookup_color (context, "error_color", &error))
@@ -122,6 +125,8 @@ na_tray_applet_style_updated (GtkWidget *widget)
   if (!gtk_style_context_lookup_color (context, "success_color", &success))
     success = fg;
 
+  gtk_style_context_restore (context);
+
   na_tray_set_colors (applet->priv->tray, &fg, &error, &warning, &success);
 
   gtk_widget_style_get (widget, "icon-padding", &padding, NULL);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]