summaryrefslogtreecommitdiff
path: root/gtk/gtkrenderbackground.c
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2016-11-08 02:20:40 +0100
committerBenjamin Otte <otte@redhat.com>2016-11-08 02:32:29 +0100
commita54db5adcd4c0e94035260e4e6157059ba89fad7 (patch)
treeb6251778f9a40e4808ec790c53f6515cea6abc6d /gtk/gtkrenderbackground.c
parentf9da4f0270c8ebbadc1500bd42bd2594c4c9edb3 (diff)
downloadgtk+-a54db5adcd4c0e94035260e4e6157059ba89fad7.tar.gz
render: Draw shadows outside of potential push_group() call
Before, the shadows were clipped.
Diffstat (limited to 'gtk/gtkrenderbackground.c')
-rw-r--r--gtk/gtkrenderbackground.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/gtk/gtkrenderbackground.c b/gtk/gtkrenderbackground.c
index c3bc5cd2de..f3e09e480a 100644
--- a/gtk/gtkrenderbackground.c
+++ b/gtk/gtkrenderbackground.c
@@ -376,6 +376,12 @@ gtk_css_style_render_background (GtkCssStyle *style,
cairo_save (cr);
cairo_translate (cr, x, y);
+ /* Outset shadows */
+ _gtk_css_shadows_value_paint_box (box_shadow,
+ cr,
+ &bg.boxes[GTK_CSS_AREA_BORDER_BOX],
+ FALSE);
+
/*
* When we have a blend mode set for the background, we cannot blend the current
* widget's drawing with whatever the content that the Cairo context may have.
@@ -392,12 +398,6 @@ gtk_css_style_render_background (GtkCssStyle *style,
cairo_push_group (cr);
}
- /* Outset shadows */
- _gtk_css_shadows_value_paint_box (box_shadow,
- cr,
- &bg.boxes[GTK_CSS_AREA_BORDER_BOX],
- FALSE);
-
_gtk_theming_background_paint_color (&bg, cr, bg_color, background_image);
number_of_layers = _gtk_css_array_value_get_n_values (background_image);
@@ -411,12 +411,6 @@ gtk_css_style_render_background (GtkCssStyle *style,
_gtk_theming_background_paint_layer (&bg, idx, cr, blend_mode);
}
- /* Inset shadows */
- _gtk_css_shadows_value_paint_box (box_shadow,
- cr,
- &bg.boxes[GTK_CSS_AREA_PADDING_BOX],
- TRUE);
-
/* Paint back the resulting surface */
if (needs_push_group)
{
@@ -425,6 +419,12 @@ gtk_css_style_render_background (GtkCssStyle *style,
cairo_restore (cr);
}
+ /* Inset shadows */
+ _gtk_css_shadows_value_paint_box (box_shadow,
+ cr,
+ &bg.boxes[GTK_CSS_AREA_PADDING_BOX],
+ TRUE);
+
cairo_restore (cr);
}