[gtk+] stylecontext: Query style properties with correct state



commit 5a3ebb486062ab4550a7233d147050e720f99069
Author: Benjamin Otte <otte redhat com>
Date:   Tue Jul 22 02:53:06 2014 +0200

    stylecontext: Query style properties with correct state
    
    Now that widget paths are allowed to have a state, use that state when
    querying style properties. This uses a fast path in gtkcssprovider.c and
    that is great.

 gtk/gtkstylecontext.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkstylecontext.c b/gtk/gtkstylecontext.c
index 8146819..f7f3179 100644
--- a/gtk/gtkstylecontext.c
+++ b/gtk/gtkstylecontext.c
@@ -2111,7 +2111,8 @@ _gtk_style_context_peek_style_property (GtkStyleContext *context,
 
       if (gtk_style_provider_get_style_property (GTK_STYLE_PROVIDER (priv->cascade),
                                                  widget_path,
-                                                 0, pspec, &pcache->value))
+                                                 gtk_widget_path_iter_get_state (widget_path, -1),
+                                                 pspec, &pcache->value))
         {
           G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
 


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