From ccb98f34e0bf4497aa5069a04300a40e81f0f97b Mon Sep 17 00:00:00 2001 From: AT Date: Tue, 9 Jul 2024 12:13:51 -0400 Subject: [PATCH] A better animation for when the model is thinking/responding. (#2557) * A better animation for when the model is thinking/responding. * ChatView: remove redundant ternary ops Signed-off-by: Adam Treat Signed-off-by: Jared Van Bortel Co-authored-by: Jared Van Bortel --- gpt4all-chat/qml/ChatView.qml | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/gpt4all-chat/qml/ChatView.qml b/gpt4all-chat/qml/ChatView.qml index a85d94c3..5f13e64c 100644 --- a/gpt4all-chat/qml/ChatView.qml +++ b/gpt4all-chat/qml/ChatView.qml @@ -813,9 +813,20 @@ Rectangle { } ColorOverlay { + id: colorOver anchors.fill: logo source: logo color: theme.conversationHeader + RotationAnimation { + id: rotationAnimation + target: colorOver + property: "rotation" + from: 0 + to: 360 + duration: 1000 + loops: Animation.Infinite + running: currentResponse && (currentChat.responseInProgress || currentChat.isRecalc) + } } } @@ -845,14 +856,7 @@ Rectangle { color: theme.mutedTextColor } RowLayout { - visible: (currentResponse ? true : false) && ((value === "" && currentChat.responseInProgress) || currentChat.isRecalc) - MyBusyIndicator { - size: 24 - color: theme.conversationProgress - Accessible.role: Accessible.Animation - Accessible.name: qsTr("Busy indicator") - Accessible.description: qsTr("The model is thinking") - } + visible: currentResponse && ((value === "" && currentChat.responseInProgress) || currentChat.isRecalc) Text { color: theme.mutedTextColor font.pixelSize: theme.fontSizeLarger