diff options
Diffstat (limited to 'libgnomecanvas/gnome-canvas.c')
-rw-r--r-- | libgnomecanvas/gnome-canvas.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/libgnomecanvas/gnome-canvas.c b/libgnomecanvas/gnome-canvas.c index 45b383b47f..4d482c5594 100644 --- a/libgnomecanvas/gnome-canvas.c +++ b/libgnomecanvas/gnome-canvas.c @@ -2817,12 +2817,15 @@ gnome_canvas_draw_background (GnomeCanvas *canvas, gint width, gint height) { - GtkStyle *style; + GtkStyleContext *style_context; + GdkRGBA rgba; - style = gtk_widget_get_style (GTK_WIDGET (canvas)); + style_context = gtk_widget_get_style_context (GTK_WIDGET (canvas)); + if (!gtk_style_context_lookup_color (style_context, "theme_bg_color", &rgba)) + gdk_rgba_parse (&rgba, "#aaaaaa"); cairo_save (cr); - gdk_cairo_set_source_color (cr, &style->bg[GTK_STATE_NORMAL]); + gdk_cairo_set_source_rgba (cr, &rgba); cairo_paint (cr); cairo_restore (cr); } |