diff options
author | Santtu Lakkala <santtu.lakkala@nomovok.com> | 2015-05-29 18:40:56 +0300 |
---|---|---|
committer | Gunnar Sletta <gunnar@sletta.org> | 2015-06-17 08:01:06 +0000 |
commit | 10ce105b25a03fbde1889ea767985d5009658a1d (patch) | |
tree | b50447f3dd6bbe0cd2621c019735f709bbf82fc3 /tests/auto/quick/qquickrectangle/data | |
parent | 96336ab0effa9a659b4a35718635fe88b10ba6fc (diff) |
QSGDefaultRectangleNode: Fix gradient position calculations
Change the gradient position calculations to consider full border, not
just half of it, because the border is fully drawn inside the
rectangle, not half outside, half inside.
Task-number: QTBUG-36059
Change-Id: Ie7dec94d9f6e03ae07c612c6e3b1950781973dc7
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Diffstat (limited to 'tests/auto/quick/qquickrectangle/data')
-rw-r--r-- | tests/auto/quick/qquickrectangle/data/gradient-border.qml | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/auto/quick/qquickrectangle/data/gradient-border.qml b/tests/auto/quick/qquickrectangle/data/gradient-border.qml new file mode 100644 index 0000000000..1d45fb2799 --- /dev/null +++ b/tests/auto/quick/qquickrectangle/data/gradient-border.qml @@ -0,0 +1,21 @@ +import QtQuick 2.0 + +Item { + Rectangle { + width: 100 + height: 100 + border.width: 10 + radius: 10 + + gradient: Gradient { + GradientStop { + position: 0.00 + color: '#ffffff' + } + GradientStop { + position: 0.94 + color: '#000000' + } + } + } +} |