+ _gtk_check_button_get_props (check_button, &indicator_size, &indicator_spacing);
+
+ border_width = gtk_container_get_border_width (GTK_CONTAINER (widget));
+
+ x = indicator_spacing + border_width;
+ y = (allocation.height - indicator_size) / 2;
+
+ child = gtk_bin_get_child (GTK_BIN (check_button));
+ if (!interior_focus || !(child && gtk_widget_get_visible (child)))
+ x += focus_width + focus_pad;
+
+ state &= ~(GTK_STATE_FLAG_INCONSISTENT |
+ GTK_STATE_FLAG_ACTIVE |
+ GTK_STATE_FLAG_SELECTED |
+ GTK_STATE_FLAG_PRELIGHT);
+
+ if (gtk_toggle_button_get_inconsistent (toggle_button))
+ state |= GTK_STATE_FLAG_INCONSISTENT;
+ else if (gtk_toggle_button_get_active (toggle_button) ||
+ (button->priv->button_down && button->priv->in_button))
+ state |= GTK_STATE_FLAG_ACTIVE;
+
+ if (button->priv->activate_timeout || (button->priv->button_down && button->priv->in_button))
+ state |= GTK_STATE_FLAG_SELECTED;
+
+ if (button->priv->in_button)
+ state |= GTK_STATE_FLAG_PRELIGHT;
+
+ 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)
+ 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);
+
+ gtk_render_check (context, cr,
+ x, y, indicator_size, indicator_size);
+
+ gtk_style_context_restore (context);