Add cancel-button and fix window-size (add printer). [CURA-6435]

This commit is contained in:
Remco Burema 2019-04-17 18:10:26 +02:00
parent bcfb2c02e5
commit b5d4ef61f5
3 changed files with 22 additions and 1 deletions

View File

@ -794,6 +794,7 @@ UM.MainWindow
title: catalog.i18nc("@title:window", "Add Printer") title: catalog.i18nc("@title:window", "Add Printer")
model: CuraApplication.getAddPrinterPagesModel() model: CuraApplication.getAddPrinterPagesModel()
progressBarVisible: false progressBarVisible: false
hasCancelButton: true
} }
Cura.WizardDialog Cura.WizardDialog
@ -802,6 +803,7 @@ UM.MainWindow
title: catalog.i18nc("@title:window", "What's New") title: catalog.i18nc("@title:window", "What's New")
model: CuraApplication.getWhatsNewPagesModel() model: CuraApplication.getWhatsNewPagesModel()
progressBarVisible: false progressBarVisible: false
hasCancelButton: false
} }
Connections Connections

View File

@ -49,7 +49,7 @@ Item
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
height: UM.Theme.getSize("expandable_component_content_header").height 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 contentShown: base.contentShown
} }

View File

@ -24,11 +24,14 @@ Window
minimumWidth: 580 * screenScaleFactor minimumWidth: 580 * screenScaleFactor
minimumHeight: 600 * screenScaleFactor minimumHeight: 600 * screenScaleFactor
maximumWidth: minimumWidth
maximumHeight: minimumHeight
color: UM.Theme.getColor("main_background") color: UM.Theme.getColor("main_background")
property var model: null // Needs to be set by whoever is using this dialog. property var model: null // Needs to be set by whoever is using this dialog.
property alias progressBarVisible: wizardPanel.progressBarVisible property alias progressBarVisible: wizardPanel.progressBarVisible
property alias hasCancelButton: cancelButton.visible
onVisibilityChanged: onVisibilityChanged:
{ {
@ -51,4 +54,20 @@ Window
target: model target: model
onAllFinished: dialog.hide() 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
}
} }