mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-08-04 10:44:46 +00:00
better open behavior
This commit is contained in:
parent
c82c24a974
commit
48c8071bdb
1 changed files with 13 additions and 3 deletions
|
|
@ -39,7 +39,7 @@ FullScreenPanel {
|
||||||
property alias fixedArea: fixedArea
|
property alias fixedArea: fixedArea
|
||||||
function open() {
|
function open() {
|
||||||
window.visible = true;
|
window.visible = true;
|
||||||
openAnim.running = true;
|
peekAnim.running = true;
|
||||||
}
|
}
|
||||||
function close() {
|
function close() {
|
||||||
closeAnim.running = true;
|
closeAnim.running = true;
|
||||||
|
|
@ -49,6 +49,8 @@ FullScreenPanel {
|
||||||
close();
|
close();
|
||||||
} else if (offset < peekHeight) {
|
} else if (offset < peekHeight) {
|
||||||
open();
|
open();
|
||||||
|
} else if (mainFlickable.contentY < 0) {
|
||||||
|
openAnim.running = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -75,7 +77,7 @@ FullScreenPanel {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
PropertyAnimation {
|
PropertyAnimation {
|
||||||
id: openAnim
|
id: peekAnim
|
||||||
target: window
|
target: window
|
||||||
duration: units.longDuration
|
duration: units.longDuration
|
||||||
easing.type: Easing.InOutQuad
|
easing.type: Easing.InOutQuad
|
||||||
|
|
@ -83,6 +85,15 @@ FullScreenPanel {
|
||||||
from: window.offset
|
from: window.offset
|
||||||
to: window.peekHeight
|
to: window.peekHeight
|
||||||
}
|
}
|
||||||
|
PropertyAnimation {
|
||||||
|
id: openAnim
|
||||||
|
target: window
|
||||||
|
duration: units.longDuration
|
||||||
|
easing.type: Easing.InOutQuad
|
||||||
|
properties: "offset"
|
||||||
|
from: window.offset
|
||||||
|
to: contentArea.height
|
||||||
|
}
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
@ -90,7 +101,6 @@ FullScreenPanel {
|
||||||
}
|
}
|
||||||
|
|
||||||
PlasmaCore.ColorScope {
|
PlasmaCore.ColorScope {
|
||||||
id: slidingArea
|
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
y: Math.min(0, -height + window.offset)
|
y: Math.min(0, -height + window.offset)
|
||||||
colorGroup: PlasmaCore.Theme.ComplementaryColorGroup
|
colorGroup: PlasmaCore.Theme.ComplementaryColorGroup
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue