mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-08-03 18:24:46 +00:00
more easily unlock
This commit is contained in:
parent
fab6121e22
commit
588bfc191d
1 changed files with 13 additions and 1 deletions
|
|
@ -390,9 +390,21 @@ MouseEventListener {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
onDraggingVerticallyChanged: {
|
onDraggingVerticallyChanged: {
|
||||||
|
if (draggingVertically) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
//manage separately the first page, the lockscreen
|
||||||
|
if (contentY < -headerItem.height + root.height &&
|
||||||
|
contentY > (-headerItem.height + root.height/6)) {
|
||||||
|
scrollAnim.to = -root.height
|
||||||
|
scrollAnim.running = true;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
//(1000/scrollAnim.duration) is the length scrolled at the current speed in the duration of the animation
|
//(1000/scrollAnim.duration) is the length scrolled at the current speed in the duration of the animation
|
||||||
|
|
||||||
if (!draggingVertically && contentY < -headerItem.height + root.height) {
|
if (contentY < -headerItem.height + root.height) {
|
||||||
scrollAnim.to = Math.round((contentY + (verticalVelocity / (1000/scrollAnim.duration))) / root.height) * root.height
|
scrollAnim.to = Math.round((contentY + (verticalVelocity / (1000/scrollAnim.duration))) / root.height) * root.height
|
||||||
scrollAnim.running = true;
|
scrollAnim.running = true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue