diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2017-11-08 16:08:56 +0100 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2017-12-19 10:48:29 +0000 |
commit | 44382ff104965c5596b5138aa84e0e4ccf178772 (patch) | |
tree | a06372db6d0ff7f62f56f2aceb8b80628aa6b0c3 /src/imports/controls/material/SwipeView.qml | |
parent | f5c13e141c9c9bf7b131da6948ebcfc01d82f160 (diff) |
SwipeView: fix slow swiping in large views
Flickable has a default maximumFlickVelocity of 2500 regardless of its
size. When SwipeView covers the whole screen and ends up being large,
2500 pixels per second is nowhere near enough. Calculate a suitable
maximum flick velocity based on the size of the view.
Task-number: QTBUG-62110
Change-Id: Iaf26f586f99e7635ea931a4e3060ad4dd480a011
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/imports/controls/material/SwipeView.qml')
-rw-r--r-- | src/imports/controls/material/SwipeView.qml | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/imports/controls/material/SwipeView.qml b/src/imports/controls/material/SwipeView.qml index 293cce46..64ecb00f 100644 --- a/src/imports/controls/material/SwipeView.qml +++ b/src/imports/controls/material/SwipeView.qml @@ -59,5 +59,6 @@ T.SwipeView { preferredHighlightBegin: 0 preferredHighlightEnd: 0 highlightMoveDuration: 250 + maximumFlickVelocity: 4 * (control.orientation === Qt.Horizontal ? width : height) } } |