diff options
author | Samuel Rødal <samuel.rodal@nokia.com> | 2011-01-26 12:37:45 (GMT) |
---|---|---|
committer | Qt Commercial Integration <QtCommercial@digia.com> | 2012-01-31 10:24:58 (GMT) |
commit | 539352106a03d6cbcb56037255ce8913514b7023 (patch) | |
tree | 2d0a8cc849715f2b343bea02ee41d8c92557b9f5 /src | |
parent | e483f2c65139d7004ba35768340adecf23319eb8 (diff) | |
download | Qt-539352106a03d6cbcb56037255ce8913514b7023.zip Qt-539352106a03d6cbcb56037255ce8913514b7023.tar.gz Qt-539352106a03d6cbcb56037255ce8913514b7023.tar.bz2 |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/painting/qcolor.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/painting/qcolor.cpp b/src/gui/painting/qcolor.cpp index ddbf6c0..425f687 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 |