gpt4all/gpt4all-chat/qml/MyButton.qml

24 lines
685 B
QML
Raw Normal View History

2023-05-22 09:01:46 -04:00
import QtCore
import QtQuick
import QtQuick.Controls
import QtQuick.Controls.Basic
Button {
id: myButton
padding: 10
contentItem: Text {
text: myButton.text
horizontalAlignment: Text.AlignHCenter
color: myButton.enabled ? theme.textColor : theme.mutedTextColor
2023-05-22 09:01:46 -04:00
Accessible.role: Accessible.Button
Accessible.name: text
}
background: Rectangle {
border.color: myButton.down ? theme.backgroundLightest : theme.buttonBorder
border.width: 2
2023-05-22 09:01:46 -04:00
radius: 10
color: myButton.hovered ? theme.backgroundDark : theme.backgroundDarkest
2023-05-22 09:01:46 -04:00
}
Accessible.role: Accessible.Button
Accessible.name: text
2023-05-22 09:01:46 -04:00
}