summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@theqtcompany.com>2015-08-24 15:29:03 +0200
committerLaszlo Agocs <laszlo.agocs@theqtcompany.com>2015-08-24 14:05:09 +0000
commit6067b74bb7baadbd28bfdfa8e2d63b775c972b0f (patch)
tree3918001366e4e6a2835153a7fb94cbd55cb5def5 /src
parent27bee8076f50a948ffb9997e2a0673854681437d (diff)
downloadqtdeclarative-6067b74bb7baadbd28bfdfa8e2d63b775c972b0f.tar.gz
qtdeclarative-6067b74bb7baadbd28bfdfa8e2d63b775c972b0f.tar.bz2
qtdeclarative-6067b74bb7baadbd28bfdfa8e2d63b775c972b0f.zip
Fix hue clamping in Context2D
It goes from 0..359, not 0..255. Task-number: QTBUG-47894 Change-Id: I0612a9d5e4999afae7703b5c49741b94fb0da07f Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
Diffstat (limited to 'src')
-rw-r--r--src/quick/items/context2d/qquickcontext2d.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/quick/items/context2d/qquickcontext2d.cpp b/src/quick/items/context2d/qquickcontext2d.cpp
index 4aa3b1c8d..c71a354e0 100644
--- a/src/quick/items/context2d/qquickcontext2d.cpp
+++ b/src/quick/items/context2d/qquickcontext2d.cpp
@@ -189,7 +189,7 @@ QColor qt_color_from_string(const QV4::Value &name)
if (isRgb)
return QColor::fromRgba(qRgba(qClamp(rh, 0, 255), qClamp(gs, 0, 255), qClamp(bl, 0, 255), qClamp(alpha, 0, 255)));
else if (isHsl)
- return QColor::fromHsl(qClamp(rh, 0, 255), qClamp(gs, 0, 255), qClamp(bl, 0, 255), qClamp(alpha, 0, 255));
+ return QColor::fromHsl(qClamp(rh, 0, 359), qClamp(gs, 0, 255), qClamp(bl, 0, 255), qClamp(alpha, 0, 255));
}
return QColor();
}