summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-06-06 20:46:03 +1000
committer2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-06-06 20:46:03 +1000
commitc3a91e7554f1421ee503c50cf045f658bc3811fd (patch)
treef99e04496e0afab2878cca325d3f60b579e5632c
parentcolours: fix flash when change wallpaper (diff)
downloadcaelestia-shell-c3a91e7554f1421ee503c50cf045f658bc3811fd.tar.gz
caelestia-shell-c3a91e7554f1421ee503c50cf045f658bc3811fd.tar.bz2
caelestia-shell-c3a91e7554f1421ee503c50cf045f658bc3811fd.zip
popouts: transition between popout content
-rw-r--r--modules/bar/popouts/Content.qml64
1 files changed, 44 insertions, 20 deletions
diff --git a/modules/bar/popouts/Content.qml b/modules/bar/popouts/Content.qml
index 4307ea7..1f9da27 100644
--- a/modules/bar/popouts/Content.qml
+++ b/modules/bar/popouts/Content.qml
@@ -63,28 +63,52 @@ Item {
anchors.verticalCenter: parent.verticalCenter
anchors.right: parent.right
- active: shouldBeActive
+ opacity: 0
+ scale: 0.8
asynchronous: true
- // Behavior on active {
- // SequentialAnimation {
- // Anim {
- // target: popout
- // property: "opacity"
- // from: popout.shouldBeActive ? 1 : 0
- // to: popout.shouldBeActive ? 0 : 1
- // duration: popout.shouldBeActive ? 0 : Appearance.anim.durations.normal
- // }
- // PropertyAction {}
- // Anim {
- // target: popout
- // property: "opacity"
- // from: popout.shouldBeActive ? 0 : 1
- // to: popout.shouldBeActive ? 1 : 0
- // duration: popout.shouldBeActive ? Appearance.anim.durations.normal : 0
- // }
- // }
- // }
+ states: State {
+ name: "active"
+ when: popout.shouldBeActive
+
+ PropertyChanges {
+ popout.active: true
+ popout.opacity: 1
+ popout.scale: 1
+ }
+ }
+
+ transitions: [
+ Transition {
+ from: "active"
+ to: ""
+
+ SequentialAnimation {
+ Anim {
+ properties: "opacity,scale"
+ duration: Appearance.anim.durations.small
+ }
+ PropertyAction {
+ target: popout
+ property: "active"
+ }
+ }
+ },
+ Transition {
+ from: ""
+ to: "active"
+
+ SequentialAnimation {
+ PropertyAction {
+ target: popout
+ property: "active"
+ }
+ Anim {
+ properties: "opacity,scale"
+ }
+ }
+ }
+ ]
}
component Anim: NumberAnimation {