From 8efa3082a11564a0891868821e58386e972b019e Mon Sep 17 00:00:00 2001 From: rbuj Date: Mon, 11 May 2020 11:27:59 +0200 Subject: =?UTF-8?q?shell-window:=20Remove=20warning=20=E2=80=98gtk=5Fpaint?= =?UTF-8?q?=5Fflat=5Fbox=E2=80=99=20is=20deprecated?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- libslab/shell-window.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'libslab') diff --git a/libslab/shell-window.c b/libslab/shell-window.c index 446529e3..44011b83 100644 --- a/libslab/shell-window.c +++ b/libslab/shell-window.c @@ -131,23 +131,23 @@ shell_window_paint_window (GtkWidget * widget, cairo_t * cr, gpointer data) { GtkWidget *left_pane; GtkAllocation allocation; + GtkStyleContext *context; left_pane = SHELL_WINDOW (widget)->_left_pane; gtk_widget_get_allocation (left_pane, &allocation); /* draw left pane background */ - gtk_paint_flat_box ( - gtk_widget_get_style (widget), - cr, - gtk_widget_get_state (widget), - GTK_SHADOW_NONE, - widget, - "", - allocation.x, - allocation.y, - allocation.width, - allocation.height); + context = gtk_widget_get_style_context (widget); + gtk_style_context_save (context); + cairo_save (cr); + gtk_render_background (context, cr, + (gdouble) allocation.x, + (gdouble) allocation.y, + (gdouble) allocation.width, + (gdouble) allocation.height); + cairo_restore (cr); + gtk_style_context_restore (context); return FALSE; } -- cgit v1.2.1