Fix bug when setting useTrackpadFix option

This commit is contained in:
vslg 2020-05-17 22:32:39 -03:00
parent f72544e3d0
commit 107f928007

View File

@ -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
}
}