mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 14:23:09 +00:00
consider the scrolling speed during scrolling
This commit is contained in:
parent
b16b234493
commit
67f73f1e0e
1 changed files with 3 additions and 1 deletions
|
|
@ -390,8 +390,10 @@ MouseEventListener {
|
|||
}
|
||||
}
|
||||
onDraggingVerticallyChanged: {
|
||||
//(1000/scrollAnim.duration) is the length scrolled at the current speed in the duration of the animation
|
||||
|
||||
if (!draggingVertically && contentY < -headerItem.height + root.height) {
|
||||
scrollAnim.to = Math.round(contentY/root.height) * root.height
|
||||
scrollAnim.to = Math.round((contentY + (verticalVelocity / (1000/scrollAnim.duration))) / root.height) * root.height
|
||||
scrollAnim.running = true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue