From c951edaa91414fd5dfddb745de49baf777f72075 Mon Sep 17 00:00:00 2001 From: Alexander Valavanis Date: Tue, 27 Jun 2017 17:11:48 +0200 Subject: color wheel: Temp fix for Gtk+ style properties --- src/widgets/gimp/gimpcolorwheel.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'src') diff --git a/src/widgets/gimp/gimpcolorwheel.c b/src/widgets/gimp/gimpcolorwheel.c index 212391497..351201121 100644 --- a/src/widgets/gimp/gimpcolorwheel.c +++ b/src/widgets/gimp/gimpcolorwheel.c @@ -307,6 +307,20 @@ gimp_color_wheel_get_preferred_width (GtkWidget *widget, gint *minimum_width, gint *natural_width) { +// TODO: Sync this fix with the upstream GIMP code when available +#if GTK_CHECK_VERSION(3,14,0) + gint outline_width; + gint padding; + gint outline_offset; + + gtk_widget_style_get (widget, + "outline-width", &outline_width, + "padding", &padding, + "outline-offset", &outline_offset, + NULL); + + *minimum_width = *natural_width = DEFAULT_SIZE + 2 * (outline_width + padding + outline_offset); +#else gint focus_width; gint focus_pad; @@ -316,6 +330,7 @@ gimp_color_wheel_get_preferred_width (GtkWidget *widget, NULL); *minimum_width = *natural_width = DEFAULT_SIZE + 2 * (focus_width + focus_pad); +#endif } static void @@ -323,6 +338,20 @@ gimp_color_wheel_get_preferred_height (GtkWidget *widget, gint *minimum_height, gint *natural_height) { +// TODO: Sync this fix with the upstream GIMP code when available +#if GTK_CHECK_VERSION(3,14,0) + gint outline_width; + gint padding; + gint outline_offset; + + gtk_widget_style_get (widget, + "outline-width", &outline_width, + "padding", &padding, + "outline-offset", &outline_offset, + NULL); + + *minimum_height = *natural_height = DEFAULT_SIZE + 2 * (outline_width + padding + outline_offset); +#else gint focus_width; gint focus_pad; @@ -332,6 +361,7 @@ gimp_color_wheel_get_preferred_height (GtkWidget *widget, NULL); *minimum_height = *natural_height = DEFAULT_SIZE + 2 * (focus_width + focus_pad); +#endif } static void -- cgit v1.2.3