diff options
author | Pablo Barciela <[email protected]> | 2018-05-05 20:52:06 +0200 |
---|---|---|
committer | Pablo Barciela <[email protected]> | 2018-05-05 21:52:40 +0200 |
commit | e88c26a010b0e3b06317680cdce397ef77c137d4 (patch) | |
tree | 215c12eb159cc5a4ab5d4ce5d1c5656a601ec446 /eel/eel-canvas.c | |
parent | df750ae2c2def80ff24b989c7f43e64a43f635aa (diff) | |
download | caja-e88c26a010b0e3b06317680cdce397ef77c137d4.tar.bz2 caja-e88c26a010b0e3b06317680cdce397ef77c137d4.tar.xz |
avoid deprecated 'gtk_style_context_get_background_color'
Diffstat (limited to 'eel/eel-canvas.c')
-rw-r--r-- | eel/eel-canvas.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/eel/eel-canvas.c b/eel/eel-canvas.c index 340f25e3..c7e31f3e 100644 --- a/eel/eel-canvas.c +++ b/eel/eel-canvas.c @@ -3024,6 +3024,7 @@ eel_canvas_draw_background (EelCanvas *canvas, cairo_rectangle_int_t rect; GtkStyleContext *style_context; GdkRGBA color; + GdkRGBA *c; if (!gdk_cairo_get_clip_rectangle (cr, &rect)) return; @@ -3031,7 +3032,13 @@ eel_canvas_draw_background (EelCanvas *canvas, cairo_save (cr); /* By default, we use the style background. */ style_context = gtk_widget_get_style_context (GTK_WIDGET (canvas)); - gtk_style_context_get_background_color (style_context, GTK_STATE_FLAG_NORMAL, &color); + + gtk_style_context_get (style_context, GTK_STATE_FLAG_NORMAL, + GTK_STYLE_PROPERTY_BACKGROUND_COLOR, + &c, NULL); + color = *c; + gdk_rgba_free (c); + gdk_cairo_set_source_rgba (cr, &color); gdk_cairo_rectangle (cr, &rect); cairo_fill (cr); |