summaryrefslogtreecommitdiff
path: root/modules/session/Wrapper.qml
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-05-11 23:55:05 +1000
committer2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-05-11 23:55:05 +1000
commit60858f6f02fb7dc04e727db89090e7b83399803a (patch)
tree0a6300271786a38a468ba4bb6df0c392eed82043 /modules/session/Wrapper.qml
parentosd: fix show on hover (diff)
downloadcaelestia-shell-60858f6f02fb7dc04e727db89090e7b83399803a.tar.gz
caelestia-shell-60858f6f02fb7dc04e727db89090e7b83399803a.tar.bz2
caelestia-shell-60858f6f02fb7dc04e727db89090e7b83399803a.zip
feat: session menu
Diffstat (limited to 'modules/session/Wrapper.qml')
-rw-r--r--modules/session/Wrapper.qml62
1 files changed, 62 insertions, 0 deletions
diff --git a/modules/session/Wrapper.qml b/modules/session/Wrapper.qml
new file mode 100644
index 0000000..5806972
--- /dev/null
+++ b/modules/session/Wrapper.qml
@@ -0,0 +1,62 @@
+import "root:/config"
+import QtQuick
+
+Item {
+ id: root
+
+ required property bool sessionVisible
+ required property real contentWidth
+ property bool shouldBeVisible
+
+ visible: width > 0
+ width: 0
+
+ states: State {
+ name: "visible"
+ when: root.sessionVisible
+
+ PropertyChanges {
+ root.width: contentWidth
+ root.shouldBeVisible: true
+ }
+ }
+
+ transitions: [
+ Transition {
+ from: ""
+ to: "visible"
+
+ SequentialAnimation {
+ PropertyAction {
+ target: root
+ property: "shouldBeVisible"
+ }
+ NumberAnimation {
+ target: root
+ property: "width"
+ duration: Appearance.anim.durations.large
+ easing.type: Easing.BezierSpline
+ easing.bezierCurve: Appearance.anim.curves.emphasizedDecel
+ }
+ }
+ },
+ Transition {
+ from: "visible"
+ to: ""
+
+ SequentialAnimation {
+ NumberAnimation {
+ target: root
+ property: "width"
+ duration: Appearance.anim.durations.normal
+ easing.type: Easing.BezierSpline
+ easing.bezierCurve: Appearance.anim.curves.emphasizedAccel
+ }
+ PropertyAction {
+ target: root
+ property: "shouldBeVisible"
+ }
+ }
+ }
+ ]
+}