diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2016-04-28 20:40:22 +0200 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2016-04-29 12:45:12 +0000 |
commit | 3980354daa4d8dfa8ec07ed2c2265ebb137b6f36 (patch) | |
tree | 88d64fe36e91c0242767e1bb5b28f984f8a63882 /tests/manual | |
parent | 8d340d7f3f28364d6b2b8fad2d4828ae761a2dad (diff) |
Revert Tumbler::displacement to position changes
This reverts commits 150d8fcc7f97e4a5d56bdcf608fa22533d807677 and
0905066bcbb967d3344d399383d0ea4b30e1d489 that broke Tumbler. The
normalized position calculation did not work in some corner cases
(eg. when the total amount of model items is just 2). Therefore,
just go back to "displacement"; and if we ever get this working
correctly, we can call it position and deprecate displacement.
Task-number: QTBUG-53061
Change-Id: Ic721f8a96c250dd5d40f881ff991fae687311996
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
Diffstat (limited to 'tests/manual')
-rw-r--r-- | tests/manual/gifs/data/qtquickcontrols2-tumbler-wrap.qml | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/manual/gifs/data/qtquickcontrols2-tumbler-wrap.qml b/tests/manual/gifs/data/qtquickcontrols2-tumbler-wrap.qml index 1cd526e4..e1139177 100644 --- a/tests/manual/gifs/data/qtquickcontrols2-tumbler-wrap.qml +++ b/tests/manual/gifs/data/qtquickcontrols2-tumbler-wrap.qml @@ -63,7 +63,7 @@ Window { Text { text: modelData.toString().length < 2 ? "0" + modelData : modelData color: "#666666" - opacity: 0.4 + Math.max(0, 1 - Math.abs(Tumbler.position)) * 0.6 + opacity: 0.4 + Math.max(0, 1 - Math.abs(Tumbler.displacement)) * 0.6 horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignVCenter font.pixelSize: fontMetrics.font.pixelSize * 1.25 @@ -79,7 +79,7 @@ Window { delegate: Text { text: (modelData.toString().length < 2 ? "0" : "") + (modelData + 1) color: "#666666" - opacity: 0.4 + Math.max(0, 1 - Math.abs(Tumbler.position)) * 0.6 + opacity: 0.4 + Math.max(0, 1 - Math.abs(Tumbler.displacement)) * 0.6 horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignVCenter font.pixelSize: fontMetrics.font.pixelSize * 1.25 |