From 44382ff104965c5596b5138aa84e0e4ccf178772 Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Wed, 8 Nov 2017 16:08:56 +0100 Subject: 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 --- src/imports/controls/SwipeView.qml | 1 + src/imports/controls/material/SwipeView.qml | 1 + 2 files changed, 2 insertions(+) (limited to 'src') diff --git a/src/imports/controls/SwipeView.qml b/src/imports/controls/SwipeView.qml index 4ccef22b..9f2d9ccb 100644 --- a/src/imports/controls/SwipeView.qml +++ b/src/imports/controls/SwipeView.qml @@ -60,5 +60,6 @@ T.SwipeView { preferredHighlightBegin: 0 preferredHighlightEnd: 0 highlightMoveDuration: 250 + maximumFlickVelocity: 4 * (control.orientation === Qt.Horizontal ? width : height) } } 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) } } -- cgit v1.2.3