diff options
author | Morten Johan Sørvig <morten.sorvig@theqtcompany.com> | 2015-08-25 12:19:21 +0200 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@theqtcompany.com> | 2016-03-15 10:34:00 +0000 |
commit | a275fb3d29d5560af22ef5c4a721ce9bf2a2ccc1 (patch) | |
tree | f9111c918bacbf4dd1c2df6c5b98effe0514bacc /tests/auto | |
parent | 101c1c5e466befc8f58f2eca35265dd32ea9f66a (diff) | |
download | qtquickcontrols-a275fb3d29d5560af22ef5c4a721ce9bf2a2ccc1.tar.gz |
Correct scrolling direction when using Sliders
Account for OS X "direct"/"inverted"/"australian"
scrolling.
This ensures that a touchpad right/left/up/down flick will move the
slider handle in the same direction as the flick.
This takes advantage of the recent addition of QWheelEvent::inverted
in qtbase
Change-Id: If51ec6f0cbc12a042a92aa55964633c9521469a9
Task-number: QTBUG-35972
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/controls/data/tst_slider.qml | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/auto/controls/data/tst_slider.qml b/tests/auto/controls/data/tst_slider.qml index 697bdac2..48612215 100644 --- a/tests/auto/controls/data/tst_slider.qml +++ b/tests/auto/controls/data/tst_slider.qml @@ -146,7 +146,7 @@ Item { var sliderDeltaRatio = 1; //(slider.maximumValue - slider.minimumValue)/slider.width var ratio = mouseRatio / sliderDeltaRatio - mouseWheel(slider, 5, 5, 20 * ratio, 0) + mouseWheel(slider, 5, 5, -20 * ratio, 0) compare(slider.value, 22) slider.maximumValue = 30 @@ -159,15 +159,15 @@ Item { compare(slider.value, 10) var previousValue = slider.value - mouseWheel(slider, 5, 5, 6 * ratio, 0) + mouseWheel(slider, 5, 5, -6 * ratio, 0) compare(slider.value, Math.round(previousValue + 6)) - mouseWheel(slider, 5, 5, -6 * ratio, 0) + mouseWheel(slider, 5, 5, 6 * ratio, 0) compare(slider.value, previousValue) // Reach maximum slider.value = 0 - mouseWheel(slider, 5, 5, 40 * ratio, 0) + mouseWheel(slider, 5, 5, -40 * ratio, 0) compare(slider.value, slider.maximumValue) slider.destroy() } |