GtkThemingEngine: Animate checkboxes activation.

This commit is contained in:
Carlos Garnacho 2010-08-19 22:47:02 +02:00
parent 7519ed278b
commit 9b949479b3

View File

@ -570,13 +570,23 @@ gtk_theming_engine_render_check (GtkThemingEngine *engine,
line_thickness);
cairo_fill (cr);
}
else if (gtk_theming_engine_is_state_set (engine, GTK_STATE_ACTIVE, NULL))
else
{
gdouble progress;
gboolean active;
active = gtk_theming_engine_is_state_set (engine, GTK_STATE_ACTIVE, &progress);
if (active || progress > 0)
{
cairo_translate (cr,
x + pad, y + pad);
cairo_scale (cr, interior_size / 7., interior_size / 7.);
cairo_rectangle (cr, 0, 0, 7 * progress, 7);
cairo_clip (cr);
cairo_move_to (cr, 7.0, 0.0);
cairo_line_to (cr, 7.5, 1.0);
cairo_curve_to (cr, 5.3, 2.0,
@ -598,6 +608,7 @@ gtk_theming_engine_render_check (GtkThemingEngine *engine,
cairo_fill (cr);
}
}
cairo_restore (cr);