Highight default action and listen to keyboard actions in image dialog

CURA-8684
This commit is contained in:
casper 2022-01-25 10:54:09 +01:00
parent c63b94375d
commit d3f01034a2

View file

@ -220,20 +220,30 @@ UM.Dialog
} }
} }
Item
{
ButtonGroup
{
buttons: [ok_button, cancel_button]
checkedButton: ok_button
}
}
onAccepted: manager.onOkButtonClicked()
onRejected: manager.onCancelButtonClicked()
rightButtons: [ rightButtons: [
Button Button
{ {
id:ok_button id:ok_button
text: catalog.i18nc("@action:button","OK"); text: catalog.i18nc("@action:button","OK");
onClicked: { manager.onOkButtonClicked() } onClicked: manager.onOkButtonClicked()
enabled: true
}, },
Button Button
{ {
id:cancel_button id:cancel_button
text: catalog.i18nc("@action:button","Cancel"); text: catalog.i18nc("@action:button","Cancel");
onClicked: { manager.onCancelButtonClicked() } onClicked: manager.onCancelButtonClicked()
enabled: true
} }
] ]
} }