summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWolfgang Ulbrich <[email protected]>2016-02-11 07:57:39 +0100
committerWolfgang Ulbrich <[email protected]>2016-02-12 07:04:31 +0100
commit7f194a381308ec2fb1ab23c90892e0f056692521 (patch)
tree5e96c57e307174f9de9698cf9555a1b35c6686d8
parentbe4afeb0b859d0e219735140f7f59addb4e8d8ba (diff)
downloadmate-panel-7f194a381308ec2fb1ab23c90892e0f056692521.tar.bz2
mate-panel-7f194a381308ec2fb1ab23c90892e0f056692521.tar.xz
GTK+-3.20 button-widget: don't use deprecated style properties
taken from: https://git.gnome.org/browse/gnome-panel/commit/?id=8b554ba
-rw-r--r--mate-panel/button-widget.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/mate-panel/button-widget.c b/mate-panel/button-widget.c
index 52a42c57..8e5b38de 100644
--- a/mate-panel/button-widget.c
+++ b/mate-panel/button-widget.c
@@ -564,11 +564,14 @@ button_widget_expose (GtkWidget *widget,
}
if (gtk_widget_has_focus (widget)) {
+#if !GTK_CHECK_VERSION (3, 19, 0)
gint focus_pad;
+#endif
gtk_style_context_save (context);
gtk_style_context_set_state (context, state_flags);
+#if !GTK_CHECK_VERSION (3, 19, 0)
gtk_widget_style_get (widget,
"focus-padding", &focus_pad,
NULL);
@@ -576,9 +579,14 @@ button_widget_expose (GtkWidget *widget,
y = focus_pad;
w = width - 2 * focus_pad;
h = height - 2 * focus_pad;
+#endif
cairo_save (cr);
+#if GTK_CHECK_VERSION (3, 19, 0)
+ gtk_render_focus (context, cr, 0, 0, width, height);
+#else
gtk_render_focus (context, cr, x, y, w, h);
+#endif
cairo_restore (cr);
gtk_style_context_restore (context);