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



commit fd7e4a1fd10542798135d1cc360b09bec7d6e27f
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 9a9b344..cbcf7d6 100644
--- a/gtk/gtkcheckbutton.c
+++ b/gtk/gtkcheckbutton.c
@@ -464,7 +464,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 5c7d000..c1428f9 100644
--- a/gtk/gtkradiobutton.c
+++ b/gtk/gtkradiobutton.c
@@ -943,7 +943,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]