diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-09-18 23:39:23 +1000 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-09-18 23:39:23 +1000 |
| commit | ef5936d0ab58b79d55d79da0c77627f09676691d (patch) | |
| tree | 04a21d49d00d912b23a1665dc5ac1fc4492c6aee /modules/lock/NotifGroup.qml | |
| parent | sidebar: add notifs (diff) | |
| download | caelestia-shell-ef5936d0ab58b79d55d79da0c77627f09676691d.tar.gz caelestia-shell-ef5936d0ab58b79d55d79da0c77627f09676691d.tar.bz2 caelestia-shell-ef5936d0ab58b79d55d79da0c77627f09676691d.zip | |
notifs: persistent notifs + better sidebar notifs
Diffstat (limited to 'modules/lock/NotifGroup.qml')
| -rw-r--r-- | modules/lock/NotifGroup.qml | 32 |
1 files changed, 23 insertions, 9 deletions
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 |