diff options
Diffstat (limited to 'applets/clock/clock.c')
-rw-r--r-- | applets/clock/clock.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/applets/clock/clock.c b/applets/clock/clock.c index ae45886c..e2fa6206 100644 --- a/applets/clock/clock.c +++ b/applets/clock/clock.c @@ -405,8 +405,10 @@ calculate_minimum_height (GtkWidget *widget, #endif PangoContext *pango_context; PangoFontMetrics *metrics; +#if !GTK_CHECK_VERSION (3, 20, 0) int focus_width = 0; int focus_pad = 0; +#endif int ascent; int descent; int thickness; @@ -435,10 +437,12 @@ calculate_minimum_height (GtkWidget *widget, #if GTK_CHECK_VERSION (3, 0, 0) gtk_style_context_get_padding (style_context, state, &padding); +#if !GTK_CHECK_VERSION (3, 20, 0) gtk_style_context_get_style (style_context, "focus-line-width", &focus_width, "focus-padding", &focus_pad, NULL); +#endif #else gtk_widget_style_get (widget, "focus-line-width", &focus_width, @@ -461,7 +465,11 @@ calculate_minimum_height (GtkWidget *widget, #endif } +#if GTK_CHECK_VERSION (3, 20, 0) + return PANGO_PIXELS (ascent + descent) + thickness; +#else return PANGO_PIXELS (ascent + descent) + 2 * (focus_width + focus_pad) + thickness; +#endif } static gboolean |