mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-29 15:03:09 +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
|
||||
function open() {
|
||||
window.visible = true;
|
||||
openAnim.running = true;
|
||||
peekAnim.running = true;
|
||||
}
|
||||
function close() {
|
||||
closeAnim.running = true;
|
||||
|
|
@ -49,6 +49,8 @@ FullScreenPanel {
|
|||
close();
|
||||
} else if (offset < peekHeight) {
|
||||
open();
|
||||
} else if (mainFlickable.contentY < 0) {
|
||||
openAnim.running = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -75,7 +77,7 @@ FullScreenPanel {
|
|||
}
|
||||
}
|
||||
PropertyAnimation {
|
||||
id: openAnim
|
||||
id: peekAnim
|
||||
target: window
|
||||
duration: units.longDuration
|
||||
easing.type: Easing.InOutQuad
|
||||
|
|
@ -83,6 +85,15 @@ FullScreenPanel {
|
|||
from: window.offset
|
||||
to: window.peekHeight
|
||||
}
|
||||
PropertyAnimation {
|
||||
id: openAnim
|
||||
target: window
|
||||
duration: units.longDuration
|
||||
easing.type: Easing.InOutQuad
|
||||
properties: "offset"
|
||||
from: window.offset
|
||||
to: contentArea.height
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
|
|
@ -90,7 +101,6 @@ FullScreenPanel {
|
|||
}
|
||||
|
||||
PlasmaCore.ColorScope {
|
||||
id: slidingArea
|
||||
anchors.fill: parent
|
||||
y: Math.min(0, -height + window.offset)
|
||||
colorGroup: PlasmaCore.Theme.ComplementaryColorGroup
|
||||
|
|
|
|||
Loading…
Reference in a new issue