- if (gtk_widget_get_state_flags (widget) & GTK_STATE_FLAG_PRELIGHT)
- {
- gtk_paint_flat_box (style, cr,
- GTK_STATE_PRELIGHT,
- GTK_SHADOW_ETCHED_OUT,
- widget, "checkbutton",
- border_width, border_width,
- allocation.width - (2 * border_width),
- allocation.height - (2 * border_width));
- }
+ 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_RADIO);
+
+ gtk_render_option (context, cr,
+ x, y, indicator_size, indicator_size);