diff options
author | Wolfgang Ulbrich <[email protected]> | 2016-01-13 15:15:35 +0100 |
---|---|---|
committer | Wolfgang Ulbrich <[email protected]> | 2016-01-13 15:15:35 +0100 |
commit | 3b7b4cfa969402c5cc9e45369f552729f2b65308 (patch) | |
tree | 610589db57c82fb63f5984d28b3009eb2c0cbb5a /eel/eel-canvas.c | |
parent | 3c5a4ef68906a73850fa2ffe403cfcd37dc31ff9 (diff) | |
parent | 1befe8ddf08c12b5c926d269b31d270fb94b9c3e (diff) | |
download | caja-3b7b4cfa969402c5cc9e45369f552729f2b65308.tar.bz2 caja-3b7b4cfa969402c5cc9e45369f552729f2b65308.tar.xz |
Merge pull request #498 from mate-desktop/dev-GtkStyleContext
port to gtk_style_context and other fixes
Diffstat (limited to 'eel/eel-canvas.c')
-rw-r--r-- | eel/eel-canvas.c | 6 |
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, >k_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); |