From 36d080abe0fbf824a42270d26e22bf8d665e7c1c Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Tue, 27 Aug 2019 17:12:32 +0200 Subject: [PATCH] restore up and down scrolling arrows --- .../package/contents/ui/launcher/Delegate.qml | 2 ++ .../ui/launcher/LauncherDragManager.qml | 1 + .../homescreen2/package/contents/ui/main.qml | 29 +++++++++++++++---- 3 files changed, 26 insertions(+), 6 deletions(-) diff --git a/containments/homescreen2/package/contents/ui/launcher/Delegate.qml b/containments/homescreen2/package/contents/ui/launcher/Delegate.qml index 788723ff..4e7d41f9 100644 --- a/containments/homescreen2/package/contents/ui/launcher/Delegate.qml +++ b/containments/homescreen2/package/contents/ui/launcher/Delegate.qml @@ -59,11 +59,13 @@ ContainmentLayoutManager.ItemContainer { if (dragActive) { // Must be 0, 0 as at this point dragCenterX and dragCenterY are on the drag before" launcherDragManager.startDrag(delegate); + launcherDragManager.currentlyDraggedDelegate = delegate; } else { launcherDragManager.dropItem(delegate, dragCenterX, dragCenterY); plasmoid.editMode = false; editMode = false; plasmoid.fullRepresentationItem.stopScroll(); + launcherDragManager.currentlyDraggedDelegate = null; } } diff --git a/containments/homescreen2/package/contents/ui/launcher/LauncherDragManager.qml b/containments/homescreen2/package/contents/ui/launcher/LauncherDragManager.qml index d1541099..56e32d30 100644 --- a/containments/homescreen2/package/contents/ui/launcher/LauncherDragManager.qml +++ b/containments/homescreen2/package/contents/ui/launcher/LauncherDragManager.qml @@ -29,6 +29,7 @@ QtObject { property ContainmentLayoutManager.AppletsLayout appletsLayout property LauncherGrid launcherGrid property FavoriteStrip favoriteStrip + property Delegate currentlyDraggedDelegate readonly property Item spacer: Item { width: units.gridUnit * 4 diff --git a/containments/homescreen2/package/contents/ui/main.qml b/containments/homescreen2/package/contents/ui/main.qml index ae9e39d2..900e2f9b 100644 --- a/containments/homescreen2/package/contents/ui/main.qml +++ b/containments/homescreen2/package/contents/ui/main.qml @@ -50,21 +50,21 @@ Text { function scrollUp() { autoScrollTimer.scrollDown = false; autoScrollTimer.running = true; -// scrollUpIndicator.opacity = 1; -// scrollDownIndicator.opacity = 0; + scrollUpIndicator.opacity = 1; + scrollDownIndicator.opacity = 0; } function scrollDown() { autoScrollTimer.scrollDown = true; autoScrollTimer.running = true; -// scrollUpIndicator.opacity = 0; -// scrollDownIndicator.opacity = 1; + scrollUpIndicator.opacity = 0; + scrollDownIndicator.opacity = 1; } function stopScroll() { autoScrollTimer.running = false; -// scrollUpIndicator.opacity = 0; -// scrollDownIndicator.opacity = 0; + scrollUpIndicator.opacity = 0; + scrollDownIndicator.opacity = 0; } //END functions @@ -247,6 +247,23 @@ Text { } } + ScrollIndicator { + id: scrollUpIndicator + anchors { + top: parent.top + topMargin: units.gridUnit * 2 + } + elementId: "up-arrow" + } + ScrollIndicator { + id: scrollDownIndicator + anchors { + bottom: parent.bottom + bottomMargin: units.gridUnit * 2 + } + elementId: "down-arrow" + } + Launcher.FavoriteStrip { id: favoriteStrip anchors {