dedup qml: convert more buttons to MyButton

This commit is contained in:
Justin Wang
2023-05-23 15:53:32 +02:00
committed by AT
parent 8e705d730d
commit eb6a7cca47
4 changed files with 24 additions and 110 deletions

View File

@@ -117,40 +117,18 @@ NOTE: By turning on this feature, you will be sending your data to the GPT4All O
padding: 20
alignment: Qt.AlignRight
spacing: 10
Button {
contentItem: Text {
color: theme.textColor
text: qsTr("Enable")
}
background: Rectangle {
border.color: theme.backgroundLightest
border.width: 1
radius: 10
color: theme.backgroundLight
}
MyButton {
text: qsTr("Enable")
Accessible.role: Accessible.Button
Accessible.name: text
Accessible.description: qsTr("Enable opt-in button")
padding: 15
DialogButtonBox.buttonRole: DialogButtonBox.AcceptRole
}
Button {
contentItem: Text {
color: theme.textColor
text: qsTr("Cancel")
}
background: Rectangle {
border.color: theme.backgroundLightest
border.width: 1
radius: 10
color: theme.backgroundLight
}
MyButton {
text: qsTr("Cancel")
Accessible.role: Accessible.Button
Accessible.name: text
Accessible.description: qsTr("Cancel opt-in button")
padding: 15
DialogButtonBox.buttonRole: DialogButtonBox.RejectRole
}
background: Rectangle {