From 0651fbd100d84f6affa38b9ed1594b55929c8351 Mon Sep 17 00:00:00 2001 From: miruka Date: Fri, 6 Sep 2019 17:03:52 -0400 Subject: [PATCH] Make page scrolling less slippery --- src/qml/Base/HListView.qml | 2 +- src/qml/Shortcuts.qml | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/qml/Base/HListView.qml b/src/qml/Base/HListView.qml index f16c99b6..2c485438 100644 --- a/src/qml/Base/HListView.qml +++ b/src/qml/Base/HListView.qml @@ -13,7 +13,7 @@ ListView { preferredHighlightBegin: height / 2 - currentItemHeight preferredHighlightEnd: height / 2 + currentItemHeight - maximumFlickVelocity: 5000 + maximumFlickVelocity: 4000 property bool enableFlicking: true diff --git a/src/qml/Shortcuts.qml b/src/qml/Shortcuts.qml index 01150223..e6199e6b 100644 --- a/src/qml/Shortcuts.qml +++ b/src/qml/Shortcuts.qml @@ -41,17 +41,20 @@ HShortcutHandler { HShortcut { sequences: settings.keys.scrollPageUp onPressed: Utils.smartVerticalFlick( - flickTarget, -2.3 * flickTarget.height, 10, + flickTarget, -2.3 * flickTarget.height, 8, ) onHeld: pressed(event) + // Ensure only a slight slip after releasing the key + onReleased: Utils.smartVerticalFlick(flickTarget, -335) } HShortcut { sequences: settings.keys.scrollPageDown onPressed: Utils.smartVerticalFlick( - flickTarget, 2.3 * flickTarget.height, 10, + flickTarget, 2.3 * flickTarget.height, 8, ) onHeld: pressed(event) + onReleased: Utils.smartVerticalFlick(flickTarget, 335) } HShortcut {