diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-05-13 18:23:11 +1000 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-05-13 18:23:11 +1000 |
| commit | 8ea4362ba1e955dfd60a553484a00356eff5e06a (patch) | |
| tree | 33cb8537a51d350a9c180e98df01d5b2c3f4af63 /modules/notifications/Wrapper.qml | |
| parent | osd: fix show on hover + show on audio/brightness change (diff) | |
| download | caelestia-shell-8ea4362ba1e955dfd60a553484a00356eff5e06a.tar.gz caelestia-shell-8ea4362ba1e955dfd60a553484a00356eff5e06a.tar.bz2 caelestia-shell-8ea4362ba1e955dfd60a553484a00356eff5e06a.zip | |
notifs: move to drawers
Diffstat (limited to 'modules/notifications/Wrapper.qml')
| -rw-r--r-- | modules/notifications/Wrapper.qml | 54 |
1 files changed, 23 insertions, 31 deletions
diff --git a/modules/notifications/Wrapper.qml b/modules/notifications/Wrapper.qml index a98ab4b..e333560 100644 --- a/modules/notifications/Wrapper.qml +++ b/modules/notifications/Wrapper.qml @@ -1,23 +1,23 @@ import "root:/config" +import Quickshell import QtQuick Item { id: root - required property bool osdVisible - required property real contentHeight - property bool shouldBeVisible + required property ShellScreen screen + required property bool visibility visible: height > 0 - height: 0 + implicitHeight: 0 + implicitWidth: content.width + BorderConfig.rounding states: State { name: "visible" - when: root.osdVisible + when: root.visibility PropertyChanges { - root.height: contentHeight - root.shouldBeVisible: true + root.implicitHeight: content.height } } @@ -26,37 +26,29 @@ Item { 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 - } + NumberAnimation { + target: root + property: "implicitHeight" + 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.standard - } - PropertyAction { - target: root - property: "shouldBeVisible" - } + NumberAnimation { + target: root + property: "implicitHeight" + duration: Appearance.anim.durations.normal + easing.type: Easing.BezierSpline + easing.bezierCurve: Appearance.anim.curves.standard } } ] + + Content { + id: content + } } |