diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/widgets/gimp/gimpcolorwheel.c | 30 |
1 files changed, 30 insertions, 0 deletions
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 |
