mirror of
https://github.com/nomic-ai/gpt4all.git
synced 2024-10-01 01:06:10 -04:00
aac00d019a
* chat: revert PR #2187
Signed-off-by: Jared Van Bortel <jared@nomic.ai>
* chat: revert PR #2148
This reverts commit f571e7e450
.
Signed-off-by: Jared Van Bortel <jared@nomic.ai>
---------
Signed-off-by: Jared Van Bortel <jared@nomic.ai>
51 lines
1.4 KiB
QML
51 lines
1.4 KiB
QML
import QtCore
|
|
import QtQuick
|
|
import QtQuick.Controls
|
|
import QtQuick.Controls.Basic
|
|
import Qt5Compat.GraphicalEffects
|
|
|
|
Button {
|
|
id: myButton
|
|
padding: 10
|
|
property color backgroundColor: theme.iconBackgroundDark
|
|
property color backgroundColorHovered: theme.iconBackgroundHovered
|
|
property bool toggled: false
|
|
property alias source: image.source
|
|
property alias fillMode: image.fillMode
|
|
contentItem: Text {
|
|
text: myButton.text
|
|
horizontalAlignment: Text.AlignHCenter
|
|
color: myButton.enabled ? theme.textColor : theme.mutedTextColor
|
|
font.pixelSize: theme.fontSizeLarge
|
|
Accessible.role: Accessible.Button
|
|
Accessible.name: text
|
|
}
|
|
|
|
background: Item {
|
|
anchors.fill: parent
|
|
Rectangle {
|
|
anchors.fill: parent
|
|
color: "transparent"
|
|
visible: myButton.toggled
|
|
border.color: theme.accentColor
|
|
border.width: 1
|
|
radius: 10
|
|
}
|
|
Image {
|
|
id: image
|
|
anchors.centerIn: parent
|
|
mipmap: true
|
|
width: 30
|
|
height: 30
|
|
}
|
|
ColorOverlay {
|
|
anchors.fill: image
|
|
source: image
|
|
color: myButton.hovered ? backgroundColorHovered : backgroundColor
|
|
}
|
|
}
|
|
Accessible.role: Accessible.Button
|
|
Accessible.name: text
|
|
ToolTip.delay: Qt.styleHints.mousePressAndHoldInterval
|
|
}
|