summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWolfgang Ulbrich <[email protected]>2015-12-26 19:59:44 +0100
committerWolfgang Ulbrich <[email protected]>2016-01-13 15:05:40 +0100
commit74bc6ba6820170591cde83ff54037f50b41b6a22 (patch)
tree6fa6df22953b1e2bafe24572468619320db42a7b
parentd99909f05e151ace2b6b3eb4f87700c417e513d5 (diff)
downloadcaja-74bc6ba6820170591cde83ff54037f50b41b6a22.tar.bz2
caja-74bc6ba6820170591cde83ff54037f50b41b6a22.tar.xz
Gtk3 eel-canvas: port to GtkStyleContext
-rw-r--r--eel/eel-canvas.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/eel/eel-canvas.c b/eel/eel-canvas.c
index 21216a61..f1f7068d 100644
--- a/eel/eel-canvas.c
+++ b/eel/eel-canvas.c
@@ -3193,13 +3193,17 @@ eel_canvas_draw_background (EelCanvas *canvas,
cairo_t *cr)
{
cairo_rectangle_int_t rect;
+ GtkStyleContext *style_context;
+ GdkRGBA color;
if (!gdk_cairo_get_clip_rectangle (cr, &rect))
return;
cairo_save (cr);
/* By default, we use the style background. */
- gdk_cairo_set_source_color (cr, &gtk_widget_get_style (GTK_WIDGET (canvas))->bg[GTK_STATE_NORMAL]);
+ style_context = gtk_widget_get_style_context (GTK_WIDGET (canvas));
+ gtk_style_context_get_background_color (style_context, GTK_STATE_FLAG_NORMAL, &color);
+ gdk_cairo_set_source_rgba (cr, &color);
gdk_cairo_rectangle (cr, &rect);
cairo_fill (cr);
cairo_restore (cr);