[gtk+/wip/strength-bar] strength-bar: remove weak/strong style classes when fraction in interval



commit 0a9a749b218dd83c0a7c1cc8e35d9f231667fbcb
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Fri Jun 8 23:40:21 2012 -0400

    strength-bar: remove weak/strong style classes when fraction in interval
    
    When weak_fraction < fraction < strong_fraction, make sure any
    weak/strong style class we might have previously added gets removed.

 gtk/gtkstrengthbar.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkstrengthbar.c b/gtk/gtkstrengthbar.c
index 89fa618..d51dbfe 100644
--- a/gtk/gtkstrengthbar.c
+++ b/gtk/gtkstrengthbar.c
@@ -341,6 +341,11 @@ gtk_strength_bar_update_style_classes (GtkStrengthBar *self)
       gtk_style_context_remove_class (context, GTK_STYLE_CLASS_WEAK);
       gtk_style_context_add_class (context, GTK_STYLE_CLASS_STRONG);
     }
+  else
+    {
+      gtk_style_context_remove_class (context, GTK_STYLE_CLASS_WEAK);
+      gtk_style_context_remove_class (context, GTK_STYLE_CLASS_STRONG);
+    }
 }
 
 static void



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