Change the display of the icon according to Vincent's suggestion.

Signed-off-by: Adam Treat <treat.adam@gmail.com>
This commit is contained in:
Adam Treat 2024-07-09 13:03:35 -04:00
parent 12056e13b1
commit d9effaaeb0

View File

@ -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