[gtk+/gtk-style-context: 393/540] Fix prelighting of inconsistent radio and check buttons



commit bb4265fc041963c8a1889ad2c31ec6125001251a
Author: Matthias Clasen <mclasen redhat com>
Date:   Wed Nov 17 01:04:14 2010 -0500

    Fix prelighting of inconsistent radio and check buttons

 gtk/gtkcheckbutton.c |    2 +-
 gtk/gtkradiobutton.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkcheckbutton.c b/gtk/gtkcheckbutton.c
index f07ecf1..ac565f4 100644
--- a/gtk/gtkcheckbutton.c
+++ b/gtk/gtkcheckbutton.c
@@ -465,7 +465,7 @@ gtk_real_check_button_draw_indicator (GtkCheckButton *check_button,
   if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL)
     x = allocation.width - (indicator_size + x);
 
-  if (gtk_widget_get_state (widget) == GTK_STATE_PRELIGHT)
+  if (gtk_widget_get_state_flags (widget) & GTK_STATE_FLAG_PRELIGHT)
     {
 
       gtk_paint_flat_box (style, cr, GTK_STATE_PRELIGHT,
diff --git a/gtk/gtkradiobutton.c b/gtk/gtkradiobutton.c
index 3347950..6a5e209 100644
--- a/gtk/gtkradiobutton.c
+++ b/gtk/gtkradiobutton.c
@@ -947,7 +947,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);
 
-  if (gtk_widget_get_state (widget) == GTK_STATE_PRELIGHT)
+  if (gtk_widget_get_state_flags (widget) & GTK_STATE_FLAG_PRELIGHT)
     {
       gtk_paint_flat_box (style, cr,
                           GTK_STATE_PRELIGHT,



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