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



commit b949e300781706d8c8a38ad477ebc67aff9d48e7
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 bd96332..f963669 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]