summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlexander Valavanis <valavanisalex@gmail.com>2017-06-27 15:11:48 +0000
committerAlexander Valavanis <valavanisalex@gmail.com>2017-06-27 15:11:48 +0000
commitc951edaa91414fd5dfddb745de49baf777f72075 (patch)
treec3b31ec60d02cec55d240dae3bf657c28e5c98af /src
parentInitial addition of menu icons (diff)
downloadinkscape-c951edaa91414fd5dfddb745de49baf777f72075.tar.gz
inkscape-c951edaa91414fd5dfddb745de49baf777f72075.zip
color wheel: Temp fix for Gtk+ style properties
Diffstat (limited to 'src')
-rw-r--r--src/widgets/gimp/gimpcolorwheel.c30
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