Commit fb5befb6 authored by Matthias Clasen's avatar Matthias Clasen Committed by Matthias Clasen

Fix clamping to [0,1] to avoid unnecessary roundtrip failures. (#93500)

2003-01-21  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkcolorsel.c (hex_changed): Fix clamping to [0,1] to avoid
	unnecessary roundtrip failures.  (#93500)
parent 1f71780c
2003-01-21 Matthias Clasen <maclas@gmx.de>
* gtk/gtkcolorsel.c (hex_changed): Fix clamping to [0,1] to avoid
unnecessary roundtrip failures. (#93500)
2003-01-19 Tor Lillqvist <tml@iki.fi>
Merge from stable:
......@@ -220,7 +225,7 @@ Wed Jan 8 18:43:03 2003 Manish Singh <yosh@gimp.org>
(selection_motion_event_handler):
(selection_scan_timeout): Support select-by-words/lines.
(gtk_text_view_button_press_event): Start a selection drag on
double/triple clicks. (#78599)
double/triple clicks. (#78499)
2003-01-06 Matthias Clasen <maclas@gmx.de>
......
2003-01-21 Matthias Clasen <maclas@gmx.de>
* gtk/gtkcolorsel.c (hex_changed): Fix clamping to [0,1] to avoid
unnecessary roundtrip failures. (#93500)
2003-01-19 Tor Lillqvist <tml@iki.fi>
Merge from stable:
......@@ -220,7 +225,7 @@ Wed Jan 8 18:43:03 2003 Manish Singh <yosh@gimp.org>
(selection_motion_event_handler):
(selection_scan_timeout): Support select-by-words/lines.
(gtk_text_view_button_press_event): Start a selection drag on
double/triple clicks. (#78599)
double/triple clicks. (#78499)
2003-01-06 Matthias Clasen <maclas@gmx.de>
......
2003-01-21 Matthias Clasen <maclas@gmx.de>
* gtk/gtkcolorsel.c (hex_changed): Fix clamping to [0,1] to avoid
unnecessary roundtrip failures. (#93500)
2003-01-19 Tor Lillqvist <tml@iki.fi>
Merge from stable:
......@@ -220,7 +225,7 @@ Wed Jan 8 18:43:03 2003 Manish Singh <yosh@gimp.org>
(selection_motion_event_handler):
(selection_scan_timeout): Support select-by-words/lines.
(gtk_text_view_button_press_event): Start a selection drag on
double/triple clicks. (#78599)
double/triple clicks. (#78499)
2003-01-06 Matthias Clasen <maclas@gmx.de>
......
2003-01-21 Matthias Clasen <maclas@gmx.de>
* gtk/gtkcolorsel.c (hex_changed): Fix clamping to [0,1] to avoid
unnecessary roundtrip failures. (#93500)
2003-01-19 Tor Lillqvist <tml@iki.fi>
Merge from stable:
......@@ -220,7 +225,7 @@ Wed Jan 8 18:43:03 2003 Manish Singh <yosh@gimp.org>
(selection_motion_event_handler):
(selection_scan_timeout): Support select-by-words/lines.
(gtk_text_view_button_press_event): Start a selection drag on
double/triple clicks. (#78599)
double/triple clicks. (#78499)
2003-01-06 Matthias Clasen <maclas@gmx.de>
......
2003-01-21 Matthias Clasen <maclas@gmx.de>
* gtk/gtkcolorsel.c (hex_changed): Fix clamping to [0,1] to avoid
unnecessary roundtrip failures. (#93500)
2003-01-19 Tor Lillqvist <tml@iki.fi>
Merge from stable:
......@@ -220,7 +225,7 @@ Wed Jan 8 18:43:03 2003 Manish Singh <yosh@gimp.org>
(selection_motion_event_handler):
(selection_scan_timeout): Support select-by-words/lines.
(gtk_text_view_button_press_event): Start a selection drag on
double/triple clicks. (#78599)
double/triple clicks. (#78499)
2003-01-06 Matthias Clasen <maclas@gmx.de>
......
......@@ -1375,9 +1375,9 @@ hex_changed (GtkWidget *hex_entry,
text = gtk_editable_get_chars (GTK_EDITABLE (priv->hex_entry), 0, -1);
if (gdk_color_parse (text, &color))
{
priv->color[COLORSEL_RED] = CLAMP (color.red/65280.0, 0.0, 1.0);
priv->color[COLORSEL_GREEN] = CLAMP (color.green/65280.0, 0.0, 1.0);
priv->color[COLORSEL_BLUE] = CLAMP (color.blue/65280.0, 0.0, 1.0);
priv->color[COLORSEL_RED] = CLAMP (color.red/65535.0, 0.0, 1.0);
priv->color[COLORSEL_GREEN] = CLAMP (color.green/65535.0, 0.0, 1.0);
priv->color[COLORSEL_BLUE] = CLAMP (color.blue/65535.0, 0.0, 1.0);
gtk_rgb_to_hsv (priv->color[COLORSEL_RED],
priv->color[COLORSEL_GREEN],
priv->color[COLORSEL_BLUE],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment