Fix the math of the down gesture

This commit is contained in:
Marco Martin 2022-06-22 17:54:54 +02:00
parent 9208a8eb0e
commit 0534110eed

View file

@ -344,7 +344,7 @@ Item {
const startDistance = thumb.windowHeap.Kirigami.ScenePosition.y + thumb.windowHeap.height - centroid.scenePressPosition.y;
const localPosition = thumb.windowHeap.Kirigami.ScenePosition.y + thumb.windowHeap.height - centroid.scenePosition.y;
return Math.min(startDistance / localPosition, 1);
return 1 - Math.min(localPosition/startDistance, 1);
}
onActiveChanged: {