summaryrefslogtreecommitdiff
path: root/libslab
diff options
context:
space:
mode:
authorrbuj <[email protected]>2020-05-11 11:27:59 +0200
committerraveit65 <[email protected]>2020-06-07 16:03:52 +0200
commit8efa3082a11564a0891868821e58386e972b019e (patch)
treedad34f9c956e27a747aec9aea762a0a36e7eb078 /libslab
parent715dcf351ff78c545a8b2e881dd35921a961565e (diff)
downloadmate-control-center-8efa3082a11564a0891868821e58386e972b019e.tar.bz2
mate-control-center-8efa3082a11564a0891868821e58386e972b019e.tar.xz
shell-window: Remove warning ‘gtk_paint_flat_box’ is deprecated
Diffstat (limited to 'libslab')
-rw-r--r--libslab/shell-window.c22
1 files changed, 11 insertions, 11 deletions
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;
}