mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-29 15:03:09 +00:00
enable the drag handler only when the containment has focus
this way it doesn't steal events anymore from the widget explorer
This commit is contained in:
parent
17938b31ae
commit
40f6abd78e
1 changed files with 4 additions and 2 deletions
|
|
@ -188,7 +188,7 @@ Item {
|
||||||
DragHandler {
|
DragHandler {
|
||||||
target: mainFlickable
|
target: mainFlickable
|
||||||
yAxis.enabled: !appletsLayout.editMode
|
yAxis.enabled: !appletsLayout.editMode
|
||||||
enabled: appDrawer.status !== Launcher.AppDrawer.Status.Open
|
enabled: root.focus && appDrawer.status !== Launcher.AppDrawer.Status.Open
|
||||||
onTranslationChanged: {
|
onTranslationChanged: {
|
||||||
if (active) {
|
if (active) {
|
||||||
appDrawer.offset = -translation.y
|
appDrawer.offset = -translation.y
|
||||||
|
|
@ -317,6 +317,7 @@ Item {
|
||||||
appletsLayout.editMode = false;
|
appletsLayout.editMode = false;
|
||||||
}
|
}
|
||||||
onLongPressed: appletsLayout.editMode = true;
|
onLongPressed: appletsLayout.editMode = true;
|
||||||
|
onPressedChanged: root.focus = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
cellWidth: favoriteStrip.cellWidth
|
cellWidth: favoriteStrip.cellWidth
|
||||||
|
|
@ -411,7 +412,7 @@ Item {
|
||||||
DragHandler {
|
DragHandler {
|
||||||
target: favoriteStrip
|
target: favoriteStrip
|
||||||
yAxis.enabled: !appletsLayout.editMode
|
yAxis.enabled: !appletsLayout.editMode
|
||||||
enabled: appDrawer.status !== Launcher.AppDrawer.Status.Open
|
enabled: root.focus && appDrawer.status !== Launcher.AppDrawer.Status.Open
|
||||||
onTranslationChanged: {
|
onTranslationChanged: {
|
||||||
if (active) {
|
if (active) {
|
||||||
appDrawer.offset = -translation.y
|
appDrawer.offset = -translation.y
|
||||||
|
|
@ -431,6 +432,7 @@ Item {
|
||||||
appletsLayout.editMode = false;
|
appletsLayout.editMode = false;
|
||||||
}
|
}
|
||||||
onLongPressed: appletsLayout.editMode = true;
|
onLongPressed: appletsLayout.editMode = true;
|
||||||
|
onPressedChanged: root.focus = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue