From 6cd5758234729f6f5473a3536d517f15c82829fb Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Fri, 10 Apr 2026 02:34:35 +1000 Subject: [PATCH] fix: animate viewport tracking and fix condition --- modules/sidebar/NotifDockList.qml | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/modules/sidebar/NotifDockList.qml b/modules/sidebar/NotifDockList.qml index 08752edc..c40a1e01 100644 --- a/modules/sidebar/NotifDockList.qml +++ b/modules/sidebar/NotifDockList.qml @@ -23,7 +23,13 @@ LazyListView { cacheBuffer: 400 asynchronous: true - onViewportAdjustNeeded: d => container.contentY += d + onViewportAdjustNeeded: d => { + if (contentYAnim.running) + contentYAnim.complete(); + contentYAnim.to = Math.max(0, container.contentY + d); + contentYAnim.start(); + } + useCustomViewport: true viewport: Qt.rect(0, container.contentY, width, container.height) @@ -54,7 +60,7 @@ LazyListView { clearTimer.start(); } - LazyListView.trackViewport: notifInner.expanded || notifInner.nonAnimHeight < notifInner.implicitHeight + LazyListView.trackViewport: !notifInner.expanded && notifInner.nonAnimHeight < notifInner.implicitHeight LazyListView.preferredHeight: closed ? 0 : notifInner.nonAnimHeight LazyListView.visibleHeight: notifInner.implicitHeight implicitHeight: notifInner.implicitHeight @@ -147,4 +153,13 @@ LazyListView { } } } + + Anim { + id: contentYAnim + + target: root.container + property: "contentY" + duration: Appearance.anim.durations.expressiveDefaultSpatial + easing.bezierCurve: Appearance.anim.curves.expressiveDefaultSpatial + } }