Merge branch 'master' into CURA-6435_new_style_add_machine

This commit is contained in:
Lipu Fei 2019-04-10 09:06:55 +02:00 committed by GitHub
commit 0e49d3dc12
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
25 changed files with 222 additions and 157 deletions

View file

@ -97,6 +97,8 @@ Item
printerTypeLabelAutoFit: true
// update printer types for all items in the list
updatePrinterTypesOnlyWhenChecked: false
updatePrinterTypesFunction: updateMachineTypes
// show printer type as it is
printerTypeLabelConversionFunction: function(value) { return value }

View file

@ -69,16 +69,14 @@ Item
width: parent.width
anchors.top: explainLabel.bottom
TextField
Cura.TextField
{
id: hostnameField
width: (parent.width / 2) | 0
height: addPrinterButton.height
anchors.verticalCenter: addPrinterButton.verticalCenter
anchors.left: parent.left
height: addPrinterButton.height
anchors.right: addPrinterButton.left
anchors.margins: UM.Theme.getSize("default_margin").width
font: UM.Theme.getFont("default")
selectByMouse: true
validator: RegExpValidator
{
@ -89,11 +87,11 @@ Item
onAccepted: addPrinterButton.clicked()
}
Cura.PrimaryButton
Cura.SecondaryButton
{
id: addPrinterButton
anchors.top: parent.top
anchors.right: parent.right
anchors.left: hostnameField.right
anchors.margins: UM.Theme.getSize("default_margin").width
text: catalog.i18nc("@button", "Add")
@ -198,7 +196,10 @@ Item
{
if (UM.OutputDeviceManager.hasManualDevice)
{
typeText.text = UM.OutputDeviceManager.manualDeviceProperty("printer_type")
const type_id = UM.OutputDeviceManager.manualDeviceProperty("printer_type")
var readable_type = Cura.MachineManager.getMachineTypeNameFromId(type_id)
readable_type = (readable_type != "") ? readable_type : catalog.i18nc("@label", "Unknown")
typeText.text = readable_type
firmwareText.text = UM.OutputDeviceManager.manualDeviceProperty("firmware_version")
addressText.text = UM.OutputDeviceManager.manualDeviceProperty("address")
}
@ -240,7 +241,7 @@ Item
id: backButton
anchors.left: parent.left
anchors.bottom: parent.bottom
text: catalog.i18nc("@button", "Cancel")
text: catalog.i18nc("@button", "Back")
onClicked: base.showPreviousPage()
}

View file

@ -70,7 +70,6 @@ Item
onClicked:
{
CuraApplication.writeToLog("i", "User declined the User Agreement.")
base.endWizard()
CuraApplication.closeApplication() // NOTE: Hard exit, don't use if anything needs to be saved!
}
}

View file

@ -27,8 +27,10 @@ Item
renderType: Text.NativeRendering
}
Rectangle
Cura.ScrollableTextArea
{
id: whatsNewTextArea
anchors.top: titleLabel.bottom
anchors.bottom: getStartedButton.top
anchors.topMargin: UM.Theme.getSize("wide_margin").height
@ -36,27 +38,12 @@ Item
anchors.left: parent.left
anchors.right: parent.right
border.color: "#dfdfdf"
border.width: UM.Theme.getSize("default_lining").width
ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
ScrollView
{
anchors.fill: parent
anchors.margins: UM.Theme.getSize("default_lining").width
ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
TextArea
{
id: whatsNewTextArea
text: CuraApplication.getTextManager().getChangeLogText()
textFormat: Text.RichText
wrapMode: Text.WordWrap
readOnly: true
font: UM.Theme.getFont("default")
renderType: Text.NativeRendering
}
}
textArea.text: CuraApplication.getTextManager().getChangeLogText()
textArea.textFormat: Text.RichText
textArea.wrapMode: Text.WordWrap
textArea.readOnly: true
}
Cura.PrimaryButton