Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcasper <c.lamboo@ultimaker.com>2022-02-18 16:21:37 +0300
committercasper <c.lamboo@ultimaker.com>2022-02-18 16:21:37 +0300
commit26470440f08a1bdc71f132993ffcea4e2b399156 (patch)
tree5a8532201d825195b95a71a70ebce42232d2915d /plugins/3MFReader/WorkspaceDialog.qml
parent67c80e8a37b61bee2998862f9d6237fd8bf03c8a (diff)
Update buttons in work space dialog
Use Cura-styled buttons Use dialog accecpt-reject handlers CURA-8688
Diffstat (limited to 'plugins/3MFReader/WorkspaceDialog.qml')
-rw-r--r--plugins/3MFReader/WorkspaceDialog.qml48
1 files changed, 14 insertions, 34 deletions
diff --git a/plugins/3MFReader/WorkspaceDialog.qml b/plugins/3MFReader/WorkspaceDialog.qml
index 450f01fbd5..781c12ad84 100644
--- a/plugins/3MFReader/WorkspaceDialog.qml
+++ b/plugins/3MFReader/WorkspaceDialog.qml
@@ -432,44 +432,24 @@ UM.Dialog
}
}
}
- Item
- {
- id: buttonsItem
- width: parent.width
- height: childrenRect.height
- anchors.bottom: parent.bottom
- anchors.right: parent.right
- Button
+
+ buttonSpacing: UM.Theme.getSize("default_margin").width
+
+ rightButtons: [
+ Cura.TertiaryButton
{
id: cancel_button
- text: catalog.i18nc("@action:button","Cancel");
- onClicked: { manager.onCancelButtonClicked() }
- enabled: true
- anchors.bottom: parent.bottom
- anchors.right: ok_button.left
- anchors.rightMargin: 2 * screenScaleFactor
- }
- Button
+ text: catalog.i18nc("@action:button", "Cancel")
+ onClicked: reject()
+ },
+ Cura.PrimaryButton
{
id: ok_button
- anchors.right: parent.right
- anchors.bottom: parent.bottom
- text: catalog.i18nc("@action:button","Open");
- onClicked: { manager.closeBackend(); manager.onOkButtonClicked() }
+ text: catalog.i18nc("@action:button", "Open")
+ onClicked: accept()
}
- }
-
+ ]
- function accept() {
- manager.closeBackend();
- manager.onOkButtonClicked();
- base.visible = false;
- base.accept();
- }
-
- function reject() {
- manager.onCancelButtonClicked();
- base.visible = false;
- base.rejected();
- }
+ onRejected: manager.onCancelButtonClicked()
+ onAccepted: manager.onOkButtonClicked()
}