mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-08-01 01:07:33 +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
|
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.
|
* Direction the panel is currently moving in.
|
||||||
*/
|
*/
|
||||||
|
|
@ -108,6 +114,11 @@ Item {
|
||||||
if (offset < 0) {
|
if (offset < 0) {
|
||||||
offset = 0;
|
offset = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (offset >= contentContainerLoader.minimizedQuickSettingsOffset && !openToPinnedMode) {
|
||||||
|
root.opened = true;
|
||||||
|
}
|
||||||
|
|
||||||
root.direction = (oldOffset === offset)
|
root.direction = (oldOffset === offset)
|
||||||
? MobileShell.Direction.None
|
? MobileShell.Direction.None
|
||||||
: (offset > oldOffset ? MobileShell.Direction.Down : MobileShell.Direction.Up);
|
: (offset > oldOffset ? MobileShell.Direction.Down : MobileShell.Direction.Up);
|
||||||
|
|
|
||||||
|
|
@ -43,6 +43,9 @@ MouseArea {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
onPressed: {
|
onPressed: {
|
||||||
oldMouseY = mouse.y;
|
oldMouseY = mouse.y;
|
||||||
|
|
||||||
|
actionDrawer.openToPinnedMode = mouse.x < root.width/2 ? false : true;
|
||||||
|
|
||||||
startSwipe();
|
startSwipe();
|
||||||
}
|
}
|
||||||
onReleased: endSwipe()
|
onReleased: endSwipe()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue