From 089e08b37e96805ce79c8a32f24bb9a071952852 Mon Sep 17 00:00:00 2001 From: Wolfgang Ulbrich Date: Thu, 11 Feb 2016 08:01:01 +0100 Subject: GTK+-3.20 clock: don't use deprecated style properties taken from: https://git.gnome.org/browse/gnome-panel/commit/?id=e67ac2a --- applets/clock/clock.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/applets/clock/clock.c b/applets/clock/clock.c index 4cda6089..3c512474 100644 --- a/applets/clock/clock.c +++ b/applets/clock/clock.c @@ -268,8 +268,10 @@ calculate_minimum_width (GtkWidget *widget, PangoContext *pango_context; PangoLayout *layout; int width, height; +#if !GTK_CHECK_VERSION (3, 19, 0) int focus_width = 0; int focus_pad = 0; +#endif #if GTK_CHECK_VERSION (3, 0, 0) GtkStyleContext *style_context; GtkStateFlags state; @@ -289,12 +291,17 @@ calculate_minimum_width (GtkWidget *widget, state = gtk_widget_get_state_flags (widget); style_context = gtk_widget_get_style_context (widget); gtk_style_context_get_padding (style_context, state, &padding); +#if GTK_CHECK_VERSION (3, 19, 0) + + width += padding.left + padding.right; +#else gtk_style_context_get_style (style_context, "focus-line-width", &focus_width, "focus-padding", &focus_pad, NULL); width += 2 * (focus_width + focus_pad) + padding.left + padding.right; +#endif #else gtk_widget_style_get (widget, "focus-line-width", &focus_width, -- cgit v1.2.1