diff options
author | Carlos Garnacho <carlosg@gnome.org> | 2011-02-05 13:44:30 +0100 |
---|---|---|
committer | Carlos Garnacho <carlosg@gnome.org> | 2011-02-05 15:26:40 +0100 |
commit | 4c40349b920c8b175a118fcca378b6e76e34180c (patch) | |
tree | 1eb79581ca36772aa0af5ba472b4ef36e3d0dd9d /gtk | |
parent | c99069992207fd93847f5fb1adf12fb28bb36d15 (diff) | |
download | gtk+-4c40349b920c8b175a118fcca378b6e76e34180c.tar.gz |
Use cairo_push_group() to mix backgrounds during transitions
It also helps remove the cairo_clip() call to achieve the rounded
shape.
Diffstat (limited to 'gtk')
-rw-r--r-- | gtk/gtkthemingengine.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/gtk/gtkthemingengine.c b/gtk/gtkthemingengine.c index 1db600ef14..a91daba875 100644 --- a/gtk/gtkthemingengine.c +++ b/gtk/gtkthemingengine.c @@ -1498,10 +1498,8 @@ render_background_internal (GtkThemingEngine *engine, NULL); running = gtk_theming_engine_state_is_running (engine, GTK_STATE_PRELIGHT, &progress); - _cairo_round_rectangle_sides (cr, (gdouble) radius, - x, y, width, height, - SIDE_ALL, junction); - cairo_clip (cr); + + cairo_push_group (cr); if (gtk_theming_engine_has_class (engine, "background")) { @@ -1711,6 +1709,14 @@ render_background_internal (GtkThemingEngine *engine, cairo_pattern_destroy (mask); } + cairo_pop_group_to_source (cr); + + _cairo_round_rectangle_sides (cr, (gdouble) radius, + x, y, width, height, + SIDE_ALL, junction); + cairo_close_path (cr); + cairo_fill (cr); + cairo_restore (cr); gdk_rgba_free (bg_color); |