diff options
author | Wolfgang Ulbrich <[email protected]> | 2016-02-11 08:01:01 +0100 |
---|---|---|
committer | Wolfgang Ulbrich <[email protected]> | 2016-02-12 07:04:31 +0100 |
commit | 089e08b37e96805ce79c8a32f24bb9a071952852 (patch) | |
tree | 54f0afd9571883b936cd532633d4903febef992f /applets/clock | |
parent | aed7b90e3db34bb57eb3abfc28b15eed13d8655f (diff) | |
download | mate-panel-089e08b37e96805ce79c8a32f24bb9a071952852.tar.bz2 mate-panel-089e08b37e96805ce79c8a32f24bb9a071952852.tar.xz |
GTK+-3.20 clock: don't use deprecated style properties
taken from:
https://git.gnome.org/browse/gnome-panel/commit/?id=e67ac2a
Diffstat (limited to 'applets/clock')
-rw-r--r-- | applets/clock/clock.c | 7 |
1 files changed, 7 insertions, 0 deletions
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, |