[gimp] Bug 749902 - Add Hue-Chroma operation/tool and LCH color selector
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] Bug 749902 - Add Hue-Chroma operation/tool and LCH color selector
- Date: Thu, 18 May 2017 17:55:36 +0000 (UTC)
commit 6ab57a12cfde91fe1c0fb178a12c331b493d4be2
Author: Michael Natterer <mitch gimp org>
Date: Thu May 18 19:53:47 2017 +0200
Bug 749902 - Add Hue-Chroma operation/tool and LCH color selector
Last bit for now: allow GimpColorScales' spinbuttons to go further
than its color scales. Please review the new min/max values of the
individual channels.
libgimpwidgets/gimpcolorscales.c | 27 ++++++++++++++++++++++-----
1 files changed, 22 insertions(+), 5 deletions(-)
---
diff --git a/libgimpwidgets/gimpcolorscales.c b/libgimpwidgets/gimpcolorscales.c
index 6b8e489..04f8423 100644
--- a/libgimpwidgets/gimpcolorscales.c
+++ b/libgimpwidgets/gimpcolorscales.c
@@ -144,13 +144,21 @@ gimp_color_scales_init (GimpColorScales *scales)
GSList *group;
gint i;
+ /*{ H, S, V, R, G, B, A, L, C, H }*/
+
static const gdouble slider_initial_vals[] =
- /*{ H, S, V, R, G, B, A, L, C, H }*/
- { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+ static const gdouble slider_min_vals[] =
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
static const gdouble slider_max_vals[] =
- { 360, 100, 100, 100, 100, 100, 100, 100, 100, 360 };
+ { 360, 100, 100, 100, 100, 100, 100, 100, 100, 360 };
static const gdouble slider_incs[] =
- { 30, 10, 10, 16, 16, 16, 10, 10, 10, 30 };
+ { 30, 10, 10, 16, 16, 16, 10, 10, 10, 30 };
+
+ static const gdouble spin_min_vals[] =
+ { 0, 0, 0, -500, -500, -500, 0, 0, 0, 0 };
+ static const gdouble spin_max_vals[] =
+ { 360, 500, 500, 500, 500, 500, 100, 300, 300, 360 };
/* don't needs the toggles for our own operation */
selector->toggles_visible = FALSE;
@@ -201,12 +209,21 @@ gimp_color_scales_init (GimpColorScales *scales)
gettext (enum_desc->value_desc),
-1, -1,
slider_initial_vals[i],
- 0.0, slider_max_vals[i],
+ slider_min_vals[i],
+ slider_max_vals[i],
1.0, slider_incs[i],
1,
gettext (enum_desc->value_help),
NULL);
+ gtk_adjustment_configure (GTK_ADJUSTMENT (scales->slider_data[i]),
+ slider_initial_vals[i],
+ spin_min_vals[i],
+ spin_max_vals[i],
+ 1.0,
+ slider_incs[i],
+ 0);
+
scales->sliders[i] = GIMP_SCALE_ENTRY_SCALE (scales->slider_data[i]);
g_object_add_weak_pointer (G_OBJECT (scales->sliders[i]),
(gpointer) &scales->sliders[i]);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]