From 89d46c1b2fd1a35a3229511f745205ac4956bf9e Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Sat, 20 Sep 2025 15:47:44 +1000 Subject: sidebar/notifs: better anims + misc fixes --- modules/sidebar/NotifGroupList.qml | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) (limited to 'modules/sidebar/NotifGroupList.qml') 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 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 + } + } } -- cgit v1.2.3-freya