From d54a63ba044e90d78ba3ca10ae7d11b888ffefce Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Mon, 2 Sep 2019 18:32:18 +0200 Subject: [PATCH] autoscroll only at the very edges --- .../homescreen2/package/contents/ui/launcher/Delegate.qml | 4 ++-- containments/homescreen2/package/contents/ui/main.qml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/containments/homescreen2/package/contents/ui/launcher/Delegate.qml b/containments/homescreen2/package/contents/ui/launcher/Delegate.qml index 38497669..79f99f4c 100644 --- a/containments/homescreen2/package/contents/ui/launcher/Delegate.qml +++ b/containments/homescreen2/package/contents/ui/launcher/Delegate.qml @@ -78,10 +78,10 @@ ContainmentLayoutManager.ItemContainer { var pos = plasmoid.fullRepresentationItem.mapFromItem(delegate, dragCenter.x, dragCenter.y); //SCROLL UP - if (pos.y < plasmoid.fullRepresentationItem.height / 4) { + if (pos.y < plasmoid.availableScreenRect.y + units.gridUnit) { plasmoid.fullRepresentationItem.scrollUp(); //SCROLL DOWN - } else if (pos.y > 3 * (plasmoid.fullRepresentationItem.height / 4)) { + } else if (pos.y > plasmoid.availableScreenRect.y + plasmoid.availableScreenRect.height - units.gridUnit) { plasmoid.fullRepresentationItem.scrollDown(); //DON't SCROLL } else { diff --git a/containments/homescreen2/package/contents/ui/main.qml b/containments/homescreen2/package/contents/ui/main.qml index b6a43101..927af774 100644 --- a/containments/homescreen2/package/contents/ui/main.qml +++ b/containments/homescreen2/package/contents/ui/main.qml @@ -321,8 +321,8 @@ Item { ScrollIndicator { id: scrollDownIndicator anchors { - bottom: parent.bottom - bottomMargin: units.gridUnit * 2 + bottom: favoriteStrip.top + bottomMargin: units.gridUnit } elementId: "down-arrow" }