From 8ea4362ba1e955dfd60a553484a00356eff5e06a Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Tue, 13 May 2025 18:23:11 +1000 Subject: notifs: move to drawers --- modules/notifications/Wrapper.qml | 54 +++++++++++++++++---------------------- 1 file changed, 23 insertions(+), 31 deletions(-) (limited to 'modules/notifications/Wrapper.qml') 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 + } } -- cgit v1.2.3-freya