restore up and down scrolling arrows

This commit is contained in:
Marco Martin 2019-08-27 17:12:32 +02:00
parent 0670efbdff
commit 36d080abe0
3 changed files with 26 additions and 6 deletions

View file

@ -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;
}
}

View file

@ -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

View file

@ -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 {