[gtk+] checkbutton: Draw background unconditionally



commit c1a063e1a43b20fe516b044e3a6a43812d7dd18b
Author: Benjamin Otte <otte redhat com>
Date:   Sun Aug 17 00:58:04 2014 +0200

    checkbutton: Draw background unconditionally
    
    We want to draw backgrounds always, not just on prelight. Themes can
    decide to only set a background during prelight themselves.

 gtk/gtkcheckbutton.c |    9 ++++-----
 gtk/gtkradiobutton.c |    9 ++++-----
 2 files changed, 8 insertions(+), 10 deletions(-)
---
diff --git a/gtk/gtkcheckbutton.c b/gtk/gtkcheckbutton.c
index 9591e77..08c2260 100644
--- a/gtk/gtkcheckbutton.c
+++ b/gtk/gtkcheckbutton.c
@@ -572,11 +572,10 @@ gtk_real_check_button_draw_indicator (GtkCheckButton *check_button,
   gtk_style_context_save (context);
   gtk_style_context_set_state (context, state);
 
-  if (state & GTK_STATE_FLAG_PRELIGHT)
-    gtk_render_background (context, cr,
-                           border_width, border_width,
-                           allocation.width - (2 * border_width),
-                           allocation.height - (2 * border_width));
+  gtk_render_background (context, cr,
+                         border_width, border_width,
+                         allocation.width - (2 * border_width),
+                         allocation.height - (2 * border_width));
 
   gtk_style_context_add_class (context, GTK_STYLE_CLASS_CHECK);
 
diff --git a/gtk/gtkradiobutton.c b/gtk/gtkradiobutton.c
index ec15635..69aab76 100644
--- a/gtk/gtkradiobutton.c
+++ b/gtk/gtkradiobutton.c
@@ -871,11 +871,10 @@ gtk_radio_button_draw_indicator (GtkCheckButton *check_button,
   gtk_style_context_save (context);
   gtk_style_context_set_state (context, state);
 
-  if (state & GTK_STATE_FLAG_PRELIGHT)
-    gtk_render_background (context, cr,
-                           border_width, border_width,
-                           allocation.width - (2 * border_width),
-                           allocation.height - (2 * border_width));
+  gtk_render_background (context, cr,
+                         border_width, border_width,
+                         allocation.width - (2 * border_width),
+                         allocation.height - (2 * border_width));
 
   gtk_style_context_add_class (context, GTK_STYLE_CLASS_RADIO);
 


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