From 24de2181329ea75d8863b25c1f110cdf326417a9 Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Tue, 6 May 2025 10:43:23 +0200 Subject: [PATCH] add listview add fade anim --- .config/quickshell/modules/sidebarLeft/AiChat.qml | 12 +++++++++++- .config/quickshell/modules/sidebarLeft/Anime.qml | 12 +++++++++++- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/.config/quickshell/modules/sidebarLeft/AiChat.qml b/.config/quickshell/modules/sidebarLeft/AiChat.qml index 8355f1611..d587e2db9 100644 --- a/.config/quickshell/modules/sidebarLeft/AiChat.qml +++ b/.config/quickshell/modules/sidebarLeft/AiChat.qml @@ -125,6 +125,7 @@ Item { ListView { // Message list id: messageListView anchors.fill: parent + spacing: 10 property int lastResponseLength: 0 @@ -147,7 +148,16 @@ Item { } } - spacing: 10 + add: Transition { + NumberAnimation { + property: "opacity" + from: 0; to: 1 + duration: Appearance.animation.elementMoveEnter.duration + easing.type: Appearance.animation.elementMoveEnter.type + easing.bezierCurve: Appearance.animation.elementMoveEnter.bezierCurve + } + } + model: ScriptModel { values: root.messages } diff --git a/.config/quickshell/modules/sidebarLeft/Anime.qml b/.config/quickshell/modules/sidebarLeft/Anime.qml index 7da4f639d..c9cbdf132 100644 --- a/.config/quickshell/modules/sidebarLeft/Anime.qml +++ b/.config/quickshell/modules/sidebarLeft/Anime.qml @@ -151,6 +151,7 @@ Item { ListView { // Booru responses id: booruResponseListView anchors.fill: parent + spacing: 10 property int lastResponseLength: 0 @@ -173,7 +174,16 @@ Item { } } - spacing: 10 + add: Transition { + NumberAnimation { + property: "opacity" + from: 0; to: 1 + duration: Appearance.animation.elementMoveEnter.duration + easing.type: Appearance.animation.elementMoveEnter.type + easing.bezierCurve: Appearance.animation.elementMoveEnter.bezierCurve + } + } + model: ScriptModel { values: { if(root.responses.length > booruResponseListView.lastResponseLength) {