From 88c1670a658d55257d50181d741afe562e44344b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Wed, 26 Jan 2011 13:37:45 +0100 Subject: Fixed hslHue / hslHueF returning the wrong value for achromatic QColors. Made toHsl() work the same way as toHsv(), ensuring the hue gets set to USHRT_MAX and not 0. Task-number: QTBUG-16530 Reviewed-by: Eskil Abrahamsen Blomfeldt --- src/gui/painting/qcolor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/gui/painting/qcolor.cpp') diff --git a/src/gui/painting/qcolor.cpp b/src/gui/painting/qcolor.cpp index dea3a72805..173fb71c8a 100644 --- a/src/gui/painting/qcolor.cpp +++ b/src/gui/painting/qcolor.cpp @@ -1781,7 +1781,7 @@ QColor QColor::toHsl() const color.ct.ahsl.lightness = qRound(lightness * USHRT_MAX); if (qFuzzyIsNull(delta)) { // achromatic case, hue is undefined - color.ct.ahsl.hue = 0; + color.ct.ahsl.hue = USHRT_MAX; color.ct.ahsl.saturation = 0; } else { // chromatic case -- cgit v1.2.3