summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2017-03-21 19:01:01 +0100
committerUlf Hermann <ulf.hermann@qt.io>2017-05-10 07:50:12 +0000
commitdfc74f42d339e94617900447437d15cbaf08b08e (patch)
treee7f4056df525d6ed455c416f7b9c234cb3ba63fd /src
parenta218356f838c4be8aad8f447e8d6187a8af639ff (diff)
downloadqtquickcontrols-dfc74f42d339e94617900447437d15cbaf08b08e.tar.gz
Slider: Don't suppress updates by dragThreshold on non-touchscreens
When using a mouse, you want a slider to react immediately to input, not only if you move beyond a certain threshold. With the threshold it is very hard to accurately position the slider. On touchscreens, the threshold is necessary to allow for unrelated events, like flicking views, to not interfere with the value. Change-Id: I6cb8252338f20de559e062e738118593ffc1e099 Task-number: QTBUG-47081 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/controls/Slider.qml2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/controls/Slider.qml b/src/controls/Slider.qml
index bf54e93e..a90bc022 100644
--- a/src/controls/Slider.qml
+++ b/src/controls/Slider.qml
@@ -264,7 +264,7 @@ Control {
onPositionChanged: {
if (pressed)
- updateHandlePosition(mouse, preventStealing)
+ updateHandlePosition(mouse, !Settings.hasTouchScreen || preventStealing)
var point = mouseArea.mapToItem(fakeHandle, mouse.x, mouse.y)
handleHovered = fakeHandle.contains(Qt.point(point.x, point.y))