[gtk+/gtk-style-context] Fix GtkRadioButton drawing



commit 7966831d9f7a3d0357140a7be7550da4bcebc7ab
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon Nov 22 21:04:18 2010 -0500

    Fix GtkRadioButton drawing

 gtk/gtkradiobutton.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkradiobutton.c b/gtk/gtkradiobutton.c
index c29423b..a6d7fb7 100644
--- a/gtk/gtkradiobutton.c
+++ b/gtk/gtkradiobutton.c
@@ -888,7 +888,7 @@ gtk_radio_button_draw_indicator (GtkCheckButton *check_button,
   GtkButton *button;
   GtkToggleButton *toggle_button;
   GtkStyleContext *context;
-  GtkStateFlags state;
+  GtkStateFlags state = 0;
   GdkWindow *window;
   gint x, y;
   gint indicator_size, indicator_spacing;
@@ -939,6 +939,7 @@ gtk_radio_button_draw_indicator (GtkCheckButton *check_button,
   if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL)
     x = allocation.width - (indicator_size + x);
 
+  gtk_style_context_save (context);
   gtk_style_context_set_state (context, state);
 
   if (state & GTK_STATE_FLAG_PRELIGHT)
@@ -947,7 +948,6 @@ gtk_radio_button_draw_indicator (GtkCheckButton *check_button,
                            allocation.width - (2 * border_width),
                            allocation.height - (2 * border_width));
 
-  gtk_style_context_save (context);
   gtk_style_context_add_class (context, GTK_STYLE_CLASS_CHECK);
 
   gtk_render_option (context, cr,



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