mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-29 15:03:09 +00:00
Merge branch 'skilvingr/plasma-mobile-actiondrawer-opening' into origin/master
This commit is contained in:
commit
be159dadc1
2 changed files with 14 additions and 0 deletions
|
|
@ -55,6 +55,12 @@ Item {
|
|||
*/
|
||||
property bool opened: false
|
||||
|
||||
/**
|
||||
* Whether the panel should open to pinned mode first, with a second stroke needed to full open.
|
||||
* Only applies to portrait mode.
|
||||
*/
|
||||
property bool openToPinnedMode: true
|
||||
|
||||
/**
|
||||
* Direction the panel is currently moving in.
|
||||
*/
|
||||
|
|
@ -108,6 +114,11 @@ Item {
|
|||
if (offset < 0) {
|
||||
offset = 0;
|
||||
}
|
||||
|
||||
if (offset >= contentContainerLoader.minimizedQuickSettingsOffset && !openToPinnedMode) {
|
||||
root.opened = true;
|
||||
}
|
||||
|
||||
root.direction = (oldOffset === offset)
|
||||
? MobileShell.Direction.None
|
||||
: (offset > oldOffset ? MobileShell.Direction.Down : MobileShell.Direction.Up);
|
||||
|
|
|
|||
|
|
@ -43,6 +43,9 @@ MouseArea {
|
|||
anchors.fill: parent
|
||||
onPressed: {
|
||||
oldMouseY = mouse.y;
|
||||
|
||||
actionDrawer.openToPinnedMode = mouse.x < root.width/2 ? false : true;
|
||||
|
||||
startSwipe();
|
||||
}
|
||||
onReleased: endSwipe()
|
||||
|
|
|
|||
Loading…
Reference in a new issue