From 588bfc191d0b40dd881f3144e34376222b770170 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Mon, 15 Jun 2015 15:04:26 -0700 Subject: [PATCH] more easily unlock --- .../homescreen/package/contents/ui/main.qml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/containments/homescreen/package/contents/ui/main.qml b/containments/homescreen/package/contents/ui/main.qml index 973d59c7..3d730d76 100644 --- a/containments/homescreen/package/contents/ui/main.qml +++ b/containments/homescreen/package/contents/ui/main.qml @@ -390,9 +390,21 @@ MouseEventListener { } } 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 - 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.running = true; }