Commit fb8494fe authored by Yari Polla's avatar Yari Polla
Browse files

actiondrawer: add ability to open and expand quicksettings with one stroke

parent 2c61bb17
Pipeline #180569 passed with stage
in 1 minute and 43 seconds
......@@ -55,6 +55,11 @@ Item {
*/
property bool opened: false
/**
* Whether the panel can be opened with one stroke.
*/
property bool expandable: false
/**
* Direction the panel is currently moving in.
*/
......@@ -108,6 +113,11 @@ Item {
if (offset < 0) {
offset = 0;
}
if (offset >= contentContainerLoader.minimizedQuickSettingsOffset && expandable) {
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.expandable = mouse.x < root.width/2 ? true : false;
startSwipe();
}
onReleased: endSwipe()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment