From ef5936d0ab58b79d55d79da0c77627f09676691d Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Thu, 18 Sep 2025 23:39:23 +1000 Subject: notifs: persistent notifs + better sidebar notifs --- modules/lock/NotifGroup.qml | 32 +++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) (limited to 'modules/lock/NotifGroup.qml') diff --git a/modules/lock/NotifGroup.qml b/modules/lock/NotifGroup.qml index 3669e5e..15342d4 100644 --- a/modules/lock/NotifGroup.qml +++ b/modules/lock/NotifGroup.qml @@ -31,11 +31,6 @@ StyledRect { radius: Appearance.rounding.normal color: root.urgency === "critical" ? Colours.palette.m3secondaryContainer : Colours.layer(Colours.palette.m3surfaceContainerHigh, 2) - RetainableLock { - object: root.notifs[0]?.notification ?? null - locked: true - } - RowLayout { id: content @@ -229,6 +224,27 @@ StyledRect { to: notif.implicitHeight } } + + ParallelAnimation { + running: notif.modelData.closed + onFinished: notif.modelData.lock(notif) + + Anim { + target: notif + property: "opacity" + to: 0 + } + Anim { + target: notif + property: "scale" + to: 0.7 + } + Anim { + target: notif.Layout + property: "preferredHeight" + to: 0 + } + } } } @@ -287,10 +303,8 @@ StyledRect { } color: root.urgency === "critical" ? Colours.palette.m3onSecondaryContainer : Colours.palette.m3onSurface - RetainableLock { - object: notifLine.modelData.notification - locked: true - } + Component.onCompleted: modelData.lock(this) + Component.onDestruction: modelData.unlock(this) TextMetrics { id: metrics -- cgit v1.2.3-freya