[gtk+] stylecontext: always add the ARROW style class when rendering an arrow



commit d80ff7b5f1489e4800ef926152c13f3503807e34
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Fri Dec 2 11:58:14 2011 -0500

    stylecontext: always add the ARROW style class when rendering an arrow
    
    When gtk_render_arrow() is called, always add an ARROW style class to
    the GtkStyleContext before rendering, so themes can specify a different
    color for it.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=665420

 gtk/gtkstylecontext.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkstylecontext.c b/gtk/gtkstylecontext.c
index 9711d03..0a6b43c 100644
--- a/gtk/gtkstylecontext.c
+++ b/gtk/gtkstylecontext.c
@@ -3716,12 +3716,16 @@ gtk_render_arrow (GtkStyleContext *context,
 
   cairo_save (cr);
 
+  gtk_style_context_save (context);
+  gtk_style_context_add_class (context, GTK_STYLE_CLASS_ARROW);
+
   store_animation_region (context, x, y, size, size);
 
   _gtk_theming_engine_set_context (priv->theming_engine, context);
   engine_class->render_arrow (priv->theming_engine, cr,
                               angle, x, y, size);
 
+  gtk_style_context_restore (context);
   cairo_restore (cr);
 }
 



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