Commit c1a063e1 authored by Benjamin Otte's avatar Benjamin Otte

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.
parent b1ac4f91
...@@ -572,11 +572,10 @@ gtk_real_check_button_draw_indicator (GtkCheckButton *check_button, ...@@ -572,11 +572,10 @@ gtk_real_check_button_draw_indicator (GtkCheckButton *check_button,
gtk_style_context_save (context); gtk_style_context_save (context);
gtk_style_context_set_state (context, state); gtk_style_context_set_state (context, state);
if (state & GTK_STATE_FLAG_PRELIGHT) gtk_render_background (context, cr,
gtk_render_background (context, cr, border_width, border_width,
border_width, border_width, allocation.width - (2 * border_width),
allocation.width - (2 * border_width), allocation.height - (2 * border_width));
allocation.height - (2 * border_width));
gtk_style_context_add_class (context, GTK_STYLE_CLASS_CHECK); gtk_style_context_add_class (context, GTK_STYLE_CLASS_CHECK);
......
...@@ -871,11 +871,10 @@ gtk_radio_button_draw_indicator (GtkCheckButton *check_button, ...@@ -871,11 +871,10 @@ gtk_radio_button_draw_indicator (GtkCheckButton *check_button,
gtk_style_context_save (context); gtk_style_context_save (context);
gtk_style_context_set_state (context, state); gtk_style_context_set_state (context, state);
if (state & GTK_STATE_FLAG_PRELIGHT) gtk_render_background (context, cr,
gtk_render_background (context, cr, border_width, border_width,
border_width, border_width, allocation.width - (2 * border_width),
allocation.width - (2 * border_width), allocation.height - (2 * border_width));
allocation.height - (2 * border_width));
gtk_style_context_add_class (context, GTK_STYLE_CLASS_RADIO); gtk_style_context_add_class (context, GTK_STYLE_CLASS_RADIO);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment