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

@@ -77,32 +77,18 @@ Dialog {
padding: 20
alignment: Qt.AlignRight
spacing: 10
Button {
contentItem: Text {
color: theme.textColor
text: qsTr("Submit")
}
background: Rectangle {
border.color: theme.backgroundLightest
border.width: 1
radius: 10
color: theme.backgroundLight
}
padding: 15
MyButton {
text: qsTr("Submit")
Accessible.role: Accessible.Button
Accessible.name: text
Accessible.description: qsTr("Submits the user's response")
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
}
padding: 15
MyButton {
text: qsTr("Cancel")
Accessible.role: Accessible.Button
Accessible.name: text
Accessible.description: qsTr("Closes the response dialog")
DialogButtonBox.buttonRole: DialogButtonBox.RejectRole
}
background: Rectangle {