summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWolfgang Ulbrich <[email protected]>2016-02-11 07:58:56 +0100
committerWolfgang Ulbrich <[email protected]>2016-02-12 07:04:31 +0100
commit01f743e5ac7c95b4fc80cd11d73657dc3176eaf0 (patch)
tree57c928ed4407363f2ef60f9dbfe0a3bea0e39a7d
parent7f194a381308ec2fb1ab23c90892e0f056692521 (diff)
downloadmate-panel-01f743e5ac7c95b4fc80cd11d73657dc3176eaf0.tar.bz2
mate-panel-01f743e5ac7c95b4fc80cd11d73657dc3176eaf0.tar.xz
GTK+-3.20 panel-toplevel: don't use deprecated style properties
taken from: https://git.gnome.org/browse/gnome-panel/commit/?id=e56b20d
-rw-r--r--mate-panel/panel-toplevel.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/mate-panel/panel-toplevel.c b/mate-panel/panel-toplevel.c
index fa1b757c..44f672af 100644
--- a/mate-panel/panel-toplevel.c
+++ b/mate-panel/panel-toplevel.c
@@ -2384,8 +2384,10 @@ calculate_minimum_height (GtkWidget *widget,
#endif
PangoContext *pango_context;
PangoFontMetrics *metrics;
+#if !GTK_CHECK_VERSION (3, 19, 0)
int focus_width = 0;
int focus_pad = 0;
+#endif
int ascent;
int descent;
int thickness;
@@ -2413,17 +2415,23 @@ calculate_minimum_height (GtkWidget *widget,
pango_font_metrics_unref (metrics);
+#if !GTK_CHECK_VERSION (3, 19, 0)
gtk_widget_style_get (widget,
"focus-line-width", &focus_width,
"focus-padding", &focus_pad,
NULL);
+#endif
#if GTK_CHECK_VERSION (3, 0, 0)
thickness = orientation & PANEL_HORIZONTAL_MASK ?
padding.top + padding.bottom :
padding.left + padding.right;
+#if GTK_CHECK_VERSION (3, 19, 0)
+ return PANGO_PIXELS (ascent + descent) + thickness;
+#else
return PANGO_PIXELS (ascent + descent) + 2 * (focus_width + focus_pad) + thickness;
+#endif
}
#else
thickness = orientation & PANEL_HORIZONTAL_MASK ?