mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 14:23:09 +00:00
fix the swipe out gesture
This commit is contained in:
parent
d3b41afc02
commit
2a0152bad0
1 changed files with 84 additions and 88 deletions
|
|
@ -38,7 +38,16 @@ Rectangle {
|
|||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
onClicked: removeAnim.running = true;
|
||||
drag.filterChildren: true
|
||||
drag.target: splitDrawer.open ? null : main
|
||||
drag.axis: Drag.XAxis
|
||||
drag.maximumX: 0
|
||||
onReleased: {
|
||||
if (main.x < -main.width/3) {
|
||||
removeAnim.running = true;
|
||||
} else {
|
||||
openAnim.running = true;
|
||||
}
|
||||
}
|
||||
|
||||
NumberAnimation {
|
||||
|
|
@ -98,6 +107,7 @@ Rectangle {
|
|||
onShouldClose: removeAnim.running = true;
|
||||
}
|
||||
MobileComponents.SplitDrawer {
|
||||
id: splitDrawer
|
||||
visible: true
|
||||
anchors.fill: parent
|
||||
drawer: PlasmaExtras.ScrollArea {
|
||||
|
|
@ -121,19 +131,7 @@ Rectangle {
|
|||
}
|
||||
}
|
||||
}
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
drag.filterChildren: true
|
||||
drag.target: main
|
||||
drag.axis: Drag.XAxis
|
||||
drag.maximumX: 0
|
||||
onReleased: {
|
||||
if (main.x < -main.width/2) {
|
||||
removeAnim.running = true;
|
||||
} else {
|
||||
openAnim.running = true;
|
||||
}
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
anchors.fill: parent
|
||||
GridLayout {
|
||||
|
|
@ -269,12 +267,10 @@ Rectangle {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Component.onCompleted: {
|
||||
main.getWidgetsButton = getWidgetsButton
|
||||
main.categoryButton = categoryButton
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue