diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-09-20 15:47:44 +1000 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-09-20 15:47:44 +1000 |
| commit | 89d46c1b2fd1a35a3229511f745205ac4956bf9e (patch) | |
| tree | aa5c7faed9c627b6933cdc533b540eb695af9dd9 /modules/sidebar/NotifGroupList.qml | |
| parent | sidebar/notifs: sort groups by latest notif (diff) | |
| download | caelestia-shell-89d46c1b2fd1a35a3229511f745205ac4956bf9e.tar.gz caelestia-shell-89d46c1b2fd1a35a3229511f745205ac4956bf9e.tar.bz2 caelestia-shell-89d46c1b2fd1a35a3229511f745205ac4956bf9e.zip | |
sidebar/notifs: better anims + misc fixes
Diffstat (limited to 'modules/sidebar/NotifGroupList.qml')
| -rw-r--r-- | modules/sidebar/NotifGroupList.qml | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/modules/sidebar/NotifGroupList.qml b/modules/sidebar/NotifGroupList.qml index 3c45b0b..162c343 100644 --- a/modules/sidebar/NotifGroupList.qml +++ b/modules/sidebar/NotifGroupList.qml @@ -14,16 +14,23 @@ Item { required property list<var> notifs required property bool expanded + readonly property real nonAnimHeight: { + let h = -root.spacing; + for (let i = 0; i < repeater.count; i++) { + const item = repeater.itemAt(i); + if (!item.modelData.closed) + h += item.nonAnimHeight + root.spacing; + } + return h; + } + readonly property int spacing: Math.round(Appearance.spacing.small / 2) property bool flag signal requestToggleExpand(expand: bool) Layout.fillWidth: true - implicitHeight: { - const item = repeater.itemAt(repeater.count - 1); - return item ? item.y + item.implicitHeight : 0; - } + implicitHeight: nonAnimHeight Repeater { id: repeater @@ -145,4 +152,11 @@ Item { } } } + + Behavior on implicitHeight { + Anim { + duration: Appearance.anim.durations.expressiveDefaultSpatial + easing.bezierCurve: Appearance.anim.curves.expressiveDefaultSpatial + } + } } |