From f9b30c1f95f6bc9c05d0ecb80ac0a6f58388f6f1 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Sat, 11 Apr 2015 10:28:05 +0200 Subject: [PATCH] better detection if we are on the fav strip --- containments/homescreen/contents/ui/main.qml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/containments/homescreen/contents/ui/main.qml b/containments/homescreen/contents/ui/main.qml index 0f29cfd6..c569faa8 100644 --- a/containments/homescreen/contents/ui/main.qml +++ b/containments/homescreen/contents/ui/main.qml @@ -116,7 +116,7 @@ MouseEventListener { property bool scrollDown: true repeat: true interval: 10 - onTriggered: { + onTriggered: {return; applicationsView.contentY += scrollDown ? 8 : -8; if (applicationsView.dragData) { dragDelegate.updateRow(); @@ -188,15 +188,19 @@ MouseEventListener { if (!autoScrollTimer.running) { - - if (mouse.y < root.height / 4) { + var pos = mapToItem(applicationsView.headerItem.favoritesStrip, mouse.x, mouse.y); + //FAVORITES + if (applicationsView.headerItem.favoritesStrip.contains(pos)) { autoScrollTimer.running = false; + //SCROLL UP } else if (applicationsView.contentY > 0 && mouse.y < root.buttonHeight + root.height / 4) { autoScrollTimer.scrollDown = false; autoScrollTimer.running = true; + //SCROLL DOWN } else if (!applicationsView.atYEnd && mouse.y > 3 * (root.height / 4)) { autoScrollTimer.scrollDown = true; autoScrollTimer.running = true; + //DON't SCROLL } else { autoScrollTimer.running = false; }