mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-07-26 06:14:45 +00:00
fix auto scrolling with drag and drop
This commit is contained in:
parent
e27cdfdf55
commit
ee6f80de62
1 changed files with 3 additions and 2 deletions
|
|
@ -61,11 +61,12 @@ DragDrop.DropArea {
|
||||||
);
|
);
|
||||||
launcherDragManager.hideSpacer();
|
launcherDragManager.hideSpacer();
|
||||||
|
|
||||||
|
let scenePos = mapToItem(null, event.x, event.y);
|
||||||
//SCROLL LEFT
|
//SCROLL LEFT
|
||||||
if (event.x < units.gridUnit) {
|
if (scenePos.x < units.gridUnit) {
|
||||||
mainFlickable.scrollLeft();
|
mainFlickable.scrollLeft();
|
||||||
//SCROLL RIGHT
|
//SCROLL RIGHT
|
||||||
} else if (event.x > mainFlickable.width - units.gridUnit) {
|
} else if (scenePos.x > mainFlickable.width - units.gridUnit) {
|
||||||
mainFlickable.scrollRight();
|
mainFlickable.scrollRight();
|
||||||
//DON't SCROLL
|
//DON't SCROLL
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue