summaryrefslogtreecommitdiff
path: root/modules/notifications/Wrapper.qml
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-05-08 20:58:18 +1000
committer2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-05-08 20:58:18 +1000
commita1ed341639fd73ce916eecfce480b14cd8660999 (patch)
treeb8d12c8f03057246e17a360f69bd83a61465e9bd /modules/notifications/Wrapper.qml
parentrefactor: split drawers (diff)
downloadcaelestia-shell-a1ed341639fd73ce916eecfce480b14cd8660999.tar.gz
caelestia-shell-a1ed341639fd73ce916eecfce480b14cd8660999.tar.bz2
caelestia-shell-a1ed341639fd73ce916eecfce480b14cd8660999.zip
feat: notification popup area
Diffstat (limited to 'modules/notifications/Wrapper.qml')
-rw-r--r--modules/notifications/Wrapper.qml62
1 files changed, 62 insertions, 0 deletions
diff --git a/modules/notifications/Wrapper.qml b/modules/notifications/Wrapper.qml
new file mode 100644
index 0000000..1d650f6
--- /dev/null
+++ b/modules/notifications/Wrapper.qml
@@ -0,0 +1,62 @@
+import "root:/config"
+import QtQuick
+
+Item {
+ id: root
+
+ required property bool osdVisible
+ required property real contentHeight
+ property bool shouldBeVisible
+
+ visible: height > 0
+ height: 0
+
+ states: State {
+ name: "visible"
+ when: root.osdVisible
+
+ PropertyChanges {
+ root.height: contentHeight
+ root.shouldBeVisible: true
+ }
+ }
+
+ transitions: [
+ Transition {
+ from: ""
+ to: "visible"
+
+ SequentialAnimation {
+ PropertyAction {
+ target: root
+ property: "shouldBeVisible"
+ }
+ NumberAnimation {
+ target: root
+ property: "height"
+ duration: Appearance.anim.durations.large
+ easing.type: Easing.BezierSpline
+ easing.bezierCurve: Appearance.anim.curves.emphasizedDecel
+ }
+ }
+ },
+ Transition {
+ from: "visible"
+ to: ""
+
+ SequentialAnimation {
+ NumberAnimation {
+ target: root
+ property: "height"
+ duration: Appearance.anim.durations.normal
+ easing.type: Easing.BezierSpline
+ easing.bezierCurve: Appearance.anim.curves.emphasizedAccel
+ }
+ PropertyAction {
+ target: root
+ property: "shouldBeVisible"
+ }
+ }
+ }
+ ]
+}