[gtk+/gtk-style-context] GtkCssProvider: Fix up state matching when looking up style properties.



commit b1925727eec4dfc03273a075e26b22ab6c5dd8e5
Author: Carlos Garnacho <carlosg gnome org>
Date:   Tue Nov 30 03:59:39 2010 +0100

    GtkCssProvider: Fix up state matching when looking up style properties.

 gtk/gtkcssprovider.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkcssprovider.c b/gtk/gtkcssprovider.c
index cb6058b..93e0589 100644
--- a/gtk/gtkcssprovider.c
+++ b/gtk/gtkcssprovider.c
@@ -1364,8 +1364,10 @@ gtk_css_provider_get_style_property (GtkStyleProvider *provider,
       val = g_hash_table_lookup (info->style, prop_name);
 
       if (val &&
-          (info->state & state) != 0 &&
-          (info->state & ~(state)) == 0)
+          (info->state == 0 ||
+           info->state == state ||
+           (info->state & state) != 0 &&
+           (info->state & ~(state)) == 0))
         {
           const gchar *val_str;
 



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