mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 14:23:09 +00:00
dismiss applet edit mode by touch
This commit is contained in:
parent
bd55057933
commit
a79a7f31f8
2 changed files with 11 additions and 2 deletions
|
|
@ -148,9 +148,10 @@ DragDrop.DropArea {
|
|||
//Hides icons close button
|
||||
appletsLayout.appletsLayoutInteracted();
|
||||
appletsLayout.editMode = false;
|
||||
appletsLayout.forceActiveFocus();
|
||||
}
|
||||
onLongPressed: appletsLayout.editMode = true;
|
||||
onPressedChanged: root.focus = true;
|
||||
onPressedChanged: appletsLayout.focus = true;
|
||||
}
|
||||
|
||||
cellWidth: favoriteStrip.cellWidth
|
||||
|
|
@ -195,6 +196,8 @@ DragDrop.DropArea {
|
|||
// Must be 0, 0 as at this point dragCenterX and dragCenterY are on the drag before"
|
||||
launcherDragManager.startDrag(appletContainer);
|
||||
launcherDragManager.currentlyDraggedDelegate = appletContainer;
|
||||
// Reparenting removed focus
|
||||
appletContainer.forceActiveFocus();
|
||||
} else {
|
||||
launcherDragManager.dropItem(appletContainer, dragCenterX, dragCenterY);
|
||||
plasmoid.editMode = false;
|
||||
|
|
@ -223,6 +226,12 @@ DragDrop.DropArea {
|
|||
|
||||
appletContainer.x = Math.max(0, Math.min(mainFlickable.width - appletContainer.width, appletContainer.x));
|
||||
}
|
||||
Connections {
|
||||
target: appletsLayout
|
||||
function onAppletsLayoutInteracted() {
|
||||
appletContainer.editMode = false;
|
||||
}
|
||||
}
|
||||
Connections {
|
||||
target: dropArea
|
||||
function onWidthChanged () {
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ DragHandler {
|
|||
snapPrevPage();
|
||||
} else if (__scrollDirection === DragGestureHandler.Right && (mainFlickable.contentX - __initialMainFlickableX > PlasmaCore.Units.gridUnit * 5)) {
|
||||
snapNextPage();
|
||||
} else {print("normal");
|
||||
} else {
|
||||
snapPage();
|
||||
}
|
||||
__scrollDirection = DragGestureHandler.None;
|
||||
|
|
|
|||
Loading…
Reference in a new issue