mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-29 15:03:09 +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()
|
||||
onFlickEnded: cancelEditModeForItemsRequested()
|
||||
|
||||
onCurrentIndexChanged: contentX = width * currentIndex;
|
||||
//onCurrentIndexChanged: contentX = width * currentIndex;
|
||||
onContentXChanged: mainFlickable.currentIndex = Math.floor(contentX / width)
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -144,6 +144,17 @@ FocusScope {
|
|||
appletsLayout.defaultItemHeight)
|
||||
);
|
||||
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