mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-20 05:19:09 +08:00
Update buttons in work space dialog
Use Cura-styled buttons Use dialog accecpt-reject handlers CURA-8688
This commit is contained in:
parent
67c80e8a37
commit
26470440f0
@ -432,44 +432,24 @@ UM.Dialog
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Item
|
|
||||||
{
|
buttonSpacing: UM.Theme.getSize("default_margin").width
|
||||||
id: buttonsItem
|
|
||||||
width: parent.width
|
rightButtons: [
|
||||||
height: childrenRect.height
|
Cura.TertiaryButton
|
||||||
anchors.bottom: parent.bottom
|
|
||||||
anchors.right: parent.right
|
|
||||||
Button
|
|
||||||
{
|
{
|
||||||
id: cancel_button
|
id: cancel_button
|
||||||
text: catalog.i18nc("@action:button","Cancel");
|
text: catalog.i18nc("@action:button", "Cancel")
|
||||||
onClicked: { manager.onCancelButtonClicked() }
|
onClicked: reject()
|
||||||
enabled: true
|
},
|
||||||
anchors.bottom: parent.bottom
|
Cura.PrimaryButton
|
||||||
anchors.right: ok_button.left
|
|
||||||
anchors.rightMargin: 2 * screenScaleFactor
|
|
||||||
}
|
|
||||||
Button
|
|
||||||
{
|
{
|
||||||
id: ok_button
|
id: ok_button
|
||||||
anchors.right: parent.right
|
text: catalog.i18nc("@action:button", "Open")
|
||||||
anchors.bottom: parent.bottom
|
onClicked: accept()
|
||||||
text: catalog.i18nc("@action:button","Open");
|
|
||||||
onClicked: { manager.closeBackend(); manager.onOkButtonClicked() }
|
|
||||||
}
|
}
|
||||||
}
|
]
|
||||||
|
|
||||||
|
onRejected: manager.onCancelButtonClicked()
|
||||||
function accept() {
|
onAccepted: manager.onOkButtonClicked()
|
||||||
manager.closeBackend();
|
|
||||||
manager.onOkButtonClicked();
|
|
||||||
base.visible = false;
|
|
||||||
base.accept();
|
|
||||||
}
|
|
||||||
|
|
||||||
function reject() {
|
|
||||||
manager.onCancelButtonClicked();
|
|
||||||
base.visible = false;
|
|
||||||
base.rejected();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user