[gtk+/gtk-style-context: 187/206] GtkStyle: set the active flag depending on shadow_type in draw_box().



commit c221f271ae5bf7d31e4a5ad9fb022e4d4fa2d20a
Author: Carlos Garnacho <carlosg gnome org>
Date:   Mon Aug 16 18:40:03 2010 +0200

    GtkStyle: set the active flag depending on shadow_type in draw_box().

 gtk/gtkstyle.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtkstyle.c b/gtk/gtkstyle.c
index 3847986..cc089ef 100644
--- a/gtk/gtkstyle.c
+++ b/gtk/gtkstyle.c
@@ -2607,6 +2607,9 @@ gtk_default_draw_box (GtkStyle      *style,
       break;
     }
 
+  if (shadow_type == GTK_SHADOW_IN)
+    flags |= GTK_STATE_FLAG_ACTIVE;
+
   gtk_style_context_set_state (context, flags);
 
   gtk_render_background (context, cr, x, y, width, height);
@@ -3208,9 +3211,6 @@ gtk_default_draw_slider (GtkStyle      *style,
 
   switch (state_type)
     {
-    case GTK_STATE_ACTIVE:
-      flags |= GTK_STATE_FLAG_ACTIVE;
-      break;
     case GTK_STATE_PRELIGHT:
       flags |= GTK_STATE_FLAG_PRELIGHT;
       break;



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