mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-08-03 18:24:46 +00:00
support auto scroll with actual dnd
This commit is contained in:
parent
dff5809c59
commit
e27b45574c
2 changed files with 12 additions and 1 deletions
|
|
@ -47,7 +47,7 @@ Flickable {
|
||||||
onFlickStarted: cancelEditModeForItemsRequested()
|
onFlickStarted: cancelEditModeForItemsRequested()
|
||||||
onFlickEnded: cancelEditModeForItemsRequested()
|
onFlickEnded: cancelEditModeForItemsRequested()
|
||||||
|
|
||||||
onCurrentIndexChanged: contentX = width * currentIndex;
|
//onCurrentIndexChanged: contentX = width * currentIndex;
|
||||||
onContentXChanged: mainFlickable.currentIndex = Math.floor(contentX / width)
|
onContentXChanged: mainFlickable.currentIndex = Math.floor(contentX / width)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -144,6 +144,17 @@ FocusScope {
|
||||||
appletsLayout.defaultItemHeight)
|
appletsLayout.defaultItemHeight)
|
||||||
);
|
);
|
||||||
launcherDragManager.hideSpacer();
|
launcherDragManager.hideSpacer();
|
||||||
|
|
||||||
|
//SCROLL LEFT
|
||||||
|
if (event.x < units.gridUnit) {
|
||||||
|
mainFlickable.scrollLeft();
|
||||||
|
//SCROLL RIGHT
|
||||||
|
} else if (event.x > mainFlickable.width - units.gridUnit) {
|
||||||
|
mainFlickable.scrollRight();
|
||||||
|
//DON't SCROLL
|
||||||
|
} else {
|
||||||
|
mainFlickable.stopScroll();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue