css: Always draw the bg color under the bg image

This commit is contained in:
Alexander Larsson 2011-11-24 22:11:00 +01:00
parent 9fd4e954b5
commit 75642d3af2

View File

@ -1721,11 +1721,15 @@ render_background_internal (GtkThemingEngine *engine,
_gtk_rounded_box_path (&clip_box, cr);
gdk_cairo_set_source_rgba (cr, &bg_color);
if (pattern)
{
cairo_surface_t *surface;
int scale_width, scale_height;
/* Fill background color first */
cairo_fill_preserve (cr);
if (cairo_pattern_get_surface (pattern, &surface) != CAIRO_STATUS_SUCCESS)
surface = NULL;
@ -1752,8 +1756,6 @@ render_background_internal (GtkThemingEngine *engine,
cairo_scale (cr, 1.0 / scale_width, 1.0 / scale_height);
cairo_translate (cr, -bg_x, -bg_y);
}
else
gdk_cairo_set_source_rgba (cr, &bg_color);
cairo_fill (cr);