From d9effaaeb097ca470cc3ace8e288c502d13391a3 Mon Sep 17 00:00:00 2001 From: Adam Treat Date: Tue, 9 Jul 2024 13:03:35 -0400 Subject: [PATCH] Change the display of the icon according to Vincent's suggestion. Signed-off-by: Adam Treat --- gpt4all-chat/qml/ChatView.qml | 33 ++++++++++++++++++++++++++++++--- 1 file changed, 30 insertions(+), 3 deletions(-) diff --git a/gpt4all-chat/qml/ChatView.qml b/gpt4all-chat/qml/ChatView.qml index f4914fad..b070236c 100644 --- a/gpt4all-chat/qml/ChatView.qml +++ b/gpt4all-chat/qml/ChatView.qml @@ -1678,10 +1678,37 @@ Rectangle { anchors.right: textInputView.right anchors.verticalCenter: textInputView.verticalCenter anchors.rightMargin: 15 - imageWidth: theme.fontSizeLargest - imageHeight: theme.fontSizeLargest visible: currentChat.responseInProgress && !currentChat.isServer - source: "qrc:/gpt4all/icons/stop_generating.svg" + + background: Item { + anchors.fill: parent + Image { + id: stopImage + anchors.centerIn: parent + visible: false + fillMode: Image.PreserveAspectFit + mipmap: true + sourceSize.width: theme.fontSizeLargest + sourceSize.height: theme.fontSizeLargest + source: "qrc:/gpt4all/icons/stop_generating.svg" + } + Rectangle { + anchors.centerIn: stopImage + width: theme.fontSizeLargest + 8 + height: theme.fontSizeLargest + 8 + color: theme.viewBackground + border.pixelAligned: false + border.color: theme.controlBorder + border.width: 1 + radius: width / 2 + } + ColorOverlay { + anchors.fill: stopImage + source: stopImage + color: stopButton.hovered ? stopButton.backgroundColorHovered : stopButton.backgroundColor + } + } + Accessible.name: qsTr("Stop generating") Accessible.description: qsTr("Stop the current response generation") ToolTip.visible: stopButton.hovered