From b5d4ef61f5aee9a84e1973b7e295eae5a4a77645 Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Wed, 17 Apr 2019 18:10:26 +0200 Subject: [PATCH] Add cancel-button and fix window-size (add printer). [CURA-6435] --- resources/qml/Cura.qml | 2 ++ resources/qml/WelcomePages/DropDownWidget.qml | 2 +- resources/qml/WelcomePages/WizardDialog.qml | 19 +++++++++++++++++++ 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/resources/qml/Cura.qml b/resources/qml/Cura.qml index f5cbe8ad53..e640b25b24 100644 --- a/resources/qml/Cura.qml +++ b/resources/qml/Cura.qml @@ -794,6 +794,7 @@ UM.MainWindow title: catalog.i18nc("@title:window", "Add Printer") model: CuraApplication.getAddPrinterPagesModel() progressBarVisible: false + hasCancelButton: true } Cura.WizardDialog @@ -802,6 +803,7 @@ UM.MainWindow title: catalog.i18nc("@title:window", "What's New") model: CuraApplication.getWhatsNewPagesModel() progressBarVisible: false + hasCancelButton: false } Connections diff --git a/resources/qml/WelcomePages/DropDownWidget.qml b/resources/qml/WelcomePages/DropDownWidget.qml index 7251e8c520..a54424b7cf 100644 --- a/resources/qml/WelcomePages/DropDownWidget.qml +++ b/resources/qml/WelcomePages/DropDownWidget.qml @@ -49,7 +49,7 @@ Item anchors.left: parent.left anchors.right: parent.right height: UM.Theme.getSize("expandable_component_content_header").height - rightIconSource: contentShown ? UM.Theme.getIcon("arrow_bottom") : UM.Theme.getIcon("arrow_right") + rightIconSource: contentShown ? UM.Theme.getIcon("arrow_bottom") : UM.Theme.getIcon("arrow_left") contentShown: base.contentShown } diff --git a/resources/qml/WelcomePages/WizardDialog.qml b/resources/qml/WelcomePages/WizardDialog.qml index 4a0867c9a2..31240b1ef5 100644 --- a/resources/qml/WelcomePages/WizardDialog.qml +++ b/resources/qml/WelcomePages/WizardDialog.qml @@ -24,11 +24,14 @@ Window minimumWidth: 580 * screenScaleFactor minimumHeight: 600 * screenScaleFactor + maximumWidth: minimumWidth + maximumHeight: minimumHeight color: UM.Theme.getColor("main_background") property var model: null // Needs to be set by whoever is using this dialog. property alias progressBarVisible: wizardPanel.progressBarVisible + property alias hasCancelButton: cancelButton.visible onVisibilityChanged: { @@ -51,4 +54,20 @@ Window target: model onAllFinished: dialog.hide() } + + Cura.SecondaryButton + { + id: cancelButton + + text: catalog.i18nc("@button", "Cancel") + + visible: false + + anchors.left: parent.left + anchors.bottom: parent.bottom + anchors.margins: UM.Theme.getSize("default_margin").width + + enabled: true + onClicked: dialog.visible = false + } }