From 107f92800731f3bd1d8efeca98f6ba2c764ac457 Mon Sep 17 00:00:00 2001 From: vslg Date: Sun, 17 May 2020 22:32:39 -0300 Subject: [PATCH] Fix bug when setting useTrackpadFix option --- src/gui/Base/HTrackpadFix.qml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/gui/Base/HTrackpadFix.qml b/src/gui/Base/HTrackpadFix.qml index 6db63bc3..d5537869 100644 --- a/src/gui/Base/HTrackpadFix.qml +++ b/src/gui/Base/HTrackpadFix.qml @@ -2,7 +2,7 @@ import QtQuick 2.12 -// Mouse area model to fix scroll on trackpad +// MouseArea component to fix scroll on trackpad MouseArea { id: mouseArea enabled: window.settings.useTrackpadFix @@ -21,6 +21,9 @@ MouseArea { property Flickable flickable: parent + // Used to get default flickDeceleration value + readonly property Flickable dummy: Flickable {} + function getNewPosition(flickable, wheel) { // wheel.pixelDelta will be available on high resolution trackpads. @@ -53,7 +56,6 @@ MouseArea { Binding { target: flickable property: "flickDeceleration" - value: 8000 - when: mouseArea.enabled + value: mouseArea.enabled ? 8000.0 : dummy.flickDeceleration } }