diff options
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 + } + } } |