[gtk+/css-fixes: 14/15] css: Always draw the bg color under the bg image
- From: Alexander Larsson <alexl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/css-fixes: 14/15] css: Always draw the bg color under the bg image
- Date: Fri, 25 Nov 2011 14:54:15 +0000 (UTC)
commit 1ca09fd55f84e015ba301f2f1e0d5810430f45e2
Author: Alexander Larsson <alexl redhat com>
Date: Thu Nov 24 22:11:00 2011 +0100
css: Always draw the bg color under the bg image
gtk/gtkthemingengine.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkthemingengine.c b/gtk/gtkthemingengine.c
index 0d30b97..307a9b6 100644
--- a/gtk/gtkthemingengine.c
+++ b/gtk/gtkthemingengine.c
@@ -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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]