From 8250c91fc428ec5421e7f924b165ac4fac3744c7 Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Thu, 21 Mar 2019 18:45:57 +0100 Subject: [PATCH 01/10] Make remove manual device (also) work (as failure-state of add manual device). [CURA-6294] --- .../src/UM3OutputDevicePlugin.py | 20 +++++------ .../WelcomePages/AddPrinterByIpContent.qml | 34 ++++++++++++++++--- 2 files changed, 39 insertions(+), 15 deletions(-) diff --git a/plugins/UM3NetworkPrinting/src/UM3OutputDevicePlugin.py b/plugins/UM3NetworkPrinting/src/UM3OutputDevicePlugin.py index 9bcbf38b77..9f1684f624 100644 --- a/plugins/UM3NetworkPrinting/src/UM3OutputDevicePlugin.py +++ b/plugins/UM3NetworkPrinting/src/UM3OutputDevicePlugin.py @@ -258,22 +258,26 @@ class UM3OutputDevicePlugin(OutputDevicePlugin): def _onNetworkRequestFinished(self, reply): reply_url = reply.url().toString() - address = "" + address = reply.url().host() device = None properties = {} # type: Dict[bytes, bytes] - if "system" in reply_url: - if reply.attribute(QNetworkRequest.HttpStatusCodeAttribute) != 200: - # Something went wrong with checking the firmware version! - return + if reply.attribute(QNetworkRequest.HttpStatusCodeAttribute) != 200: + # Either: + # - Something went wrong with checking the firmware version! + # - Something went wrong with checking the amount of printers the cluster has! + # - Couldn't find printer at the address when trying to add it manually. + if address in self._manual_instances: + self.removeManualDeviceSignal.emit(self.getPluginId(), "", address) + return + if "system" in reply_url: try: system_info = json.loads(bytes(reply.readAll()).decode("utf-8")) except: Logger.log("e", "Something went wrong converting the JSON.") return - address = reply.url().host() has_cluster_capable_firmware = Version(system_info["firmware"]) > self._min_cluster_version instance_name = "manual:%s" % address properties = { @@ -301,16 +305,12 @@ class UM3OutputDevicePlugin(OutputDevicePlugin): self._network_manager.get(cluster_request) elif "printers" in reply_url: - if reply.attribute(QNetworkRequest.HttpStatusCodeAttribute) != 200: - # Something went wrong with checking the amount of printers the cluster has! - return # So we confirmed that the device is in fact a cluster printer, and we should now know how big it is. try: cluster_printers_list = json.loads(bytes(reply.readAll()).decode("utf-8")) except: Logger.log("e", "Something went wrong converting the JSON.") return - address = reply.url().host() instance_name = "manual:%s" % address if instance_name in self._discovered_devices: device = self._discovered_devices[instance_name] diff --git a/resources/qml/WelcomePages/AddPrinterByIpContent.qml b/resources/qml/WelcomePages/AddPrinterByIpContent.qml index f3ed58200b..c67e93c9a7 100644 --- a/resources/qml/WelcomePages/AddPrinterByIpContent.qml +++ b/resources/qml/WelcomePages/AddPrinterByIpContent.qml @@ -113,6 +113,12 @@ Item ! addPrinterByIpScreen.haveConnection } } + + Connections + { + target: UM.OutputDeviceManager + onManualDeviceChanged: { addPrinterButton.enabled = ! UM.OutputDeviceManager.hasManualDevice } + } } } @@ -172,9 +178,18 @@ Item target: UM.OutputDeviceManager onManualDeviceChanged: { - typeText.text = UM.OutputDeviceManager.manualDeviceProperty("printer_type") - firmwareText.text = UM.OutputDeviceManager.manualDeviceProperty("firmware_version") - addressText.text = UM.OutputDeviceManager.manualDeviceProperty("address") + if (UM.OutputDeviceManager.hasManualDevice) + { + typeText.text = UM.OutputDeviceManager.manualDeviceProperty("printer_type") + firmwareText.text = UM.OutputDeviceManager.manualDeviceProperty("firmware_version") + addressText.text = UM.OutputDeviceManager.manualDeviceProperty("address") + } + else + { + typeText.text = "" + firmwareText.text = "" + addressText.text = "" + } } } } @@ -184,8 +199,17 @@ Item target: UM.OutputDeviceManager onManualDeviceChanged: { - printerNameLabel.text = UM.OutputDeviceManager.manualDeviceProperty("name") - addPrinterByIpScreen.haveConnection = true + if (UM.OutputDeviceManager.hasManualDevice) + { + printerNameLabel.text = UM.OutputDeviceManager.manualDeviceProperty("name") + addPrinterByIpScreen.haveConnection = true + } + else + { + printerNameLabel.text = catalog.i18nc("@label", "Could not connect to device.") + addPrinterByIpScreen.hasSentRequest = false + addPrinterByIpScreen.haveConnection = false + } } } } From a2c2424d6927a4ba8306e7c46786bba2aaff0048 Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Fri, 22 Mar 2019 12:24:11 +0100 Subject: [PATCH 02/10] Use Label for SignIn button --- resources/qml/WelcomePages/CloudContent.qml | 22 +++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/resources/qml/WelcomePages/CloudContent.qml b/resources/qml/WelcomePages/CloudContent.qml index 07881553ef..84b8232a3f 100644 --- a/resources/qml/WelcomePages/CloudContent.qml +++ b/resources/qml/WelcomePages/CloudContent.qml @@ -120,18 +120,24 @@ Item onClicked: Qt.openUrlExternally(CuraApplication.ultimakerCloudAccountRootUrl + "/app/create") } - Cura.SecondaryButton + Label { id: signInButton anchors.left: createAccountButton.right anchors.verticalCenter: finishButton.verticalCenter + anchors.margins: UM.Theme.getSize("welcome_pages_default_margin").width text: catalog.i18nc("@button", "Sign in") - width: 80 - shadowEnabled: false - color: "transparent" - hoverColor: "transparent" - textHoverColor: UM.Theme.getColor("primary") - fixedWidthMode: true - onClicked: Cura.API.account.login() + color: UM.Theme.getColor("secondary_button_text") + font: UM.Theme.getFont("medium") + renderType: Text.NativeRendering + + MouseArea + { + anchors.fill: parent + hoverEnabled: true + onClicked: Cura.API.account.login() + onEntered: parent.font.underline = true + onExited: parent.font.underline = false + } } } From 26acad3dbcecaf61baca13a575045e43ac352d22 Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Fri, 22 Mar 2019 12:55:25 +0100 Subject: [PATCH 03/10] Cleanup unnecessary hard-coded numbers in styling --- resources/qml/WelcomePages/DropDownWidget.qml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/resources/qml/WelcomePages/DropDownWidget.qml b/resources/qml/WelcomePages/DropDownWidget.qml index cff9cf8ac1..43f92218fc 100644 --- a/resources/qml/WelcomePages/DropDownWidget.qml +++ b/resources/qml/WelcomePages/DropDownWidget.qml @@ -21,14 +21,14 @@ Item id: base - implicitWidth: 200 - height: header.contentShown ? (header.height + contentRectangle.height + 30) : header.height + implicitWidth: 200 * screenScaleFactor + height: header.contentShown ? (header.height + contentRectangle.height) : header.height property var contentComponent: null property alias contentItem: contentLoader.item property alias title: header.title - property bool contentShown: false + property bool contentShown: false // indicates if this dropdown widget is expanded to show its content signal clicked() @@ -59,7 +59,7 @@ Item anchors.top: header.bottom anchors.left: header.left anchors.right: header.right - height: contentLoader.height + 2 + height: contentLoader.height border.width: UM.Theme.getSize("default_lining").width border.color: UM.Theme.getColor("lining") From 2074bf913311c85a165e85b0b5c899ab4a6db617 Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Fri, 22 Mar 2019 13:06:35 +0100 Subject: [PATCH 04/10] Use theme --- resources/qml/WelcomePages/DropDownWidget.qml | 4 +++- resources/qml/WelcomePages/StepPanel.qml | 3 ++- resources/qml/WelcomePages/WhatsNewContent.qml | 4 ++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/resources/qml/WelcomePages/DropDownWidget.qml b/resources/qml/WelcomePages/DropDownWidget.qml index 43f92218fc..9f413769e0 100644 --- a/resources/qml/WelcomePages/DropDownWidget.qml +++ b/resources/qml/WelcomePages/DropDownWidget.qml @@ -74,7 +74,9 @@ Item anchors.top: parent.top anchors.left: parent.left anchors.right: parent.right - anchors.margins: 1 + // Keep a small margin with the Rectangle container so its content will not overlap with the Rectangle + // border. + anchors.margins: UM.Theme.getSize("default_lining").width sourceComponent: base.contentComponent != null ? base.contentComponent : emptyComponent } diff --git a/resources/qml/WelcomePages/StepPanel.qml b/resources/qml/WelcomePages/StepPanel.qml index 7e0c00a987..1ec44571b5 100644 --- a/resources/qml/WelcomePages/StepPanel.qml +++ b/resources/qml/WelcomePages/StepPanel.qml @@ -41,7 +41,8 @@ Item { currentStep++ } - else { + else + { passLastPage() } } diff --git a/resources/qml/WelcomePages/WhatsNewContent.qml b/resources/qml/WelcomePages/WhatsNewContent.qml index 2c51fdd1cd..d9d3648d6a 100644 --- a/resources/qml/WelcomePages/WhatsNewContent.qml +++ b/resources/qml/WelcomePages/WhatsNewContent.qml @@ -32,8 +32,8 @@ Item { anchors.top: titleLabel.bottom anchors.bottom: getStartedButton.top - anchors.topMargin: 40 - anchors.bottomMargin: 40 + anchors.topMargin: UM.Theme.getSize("welcome_pages_default_margin").height + anchors.bottomMargin: UM.Theme.getSize("welcome_pages_default_margin").height anchors.horizontalCenter: parent.horizontalCenter width: parent.width * 3 / 4 From 457eb93758d570fc44141bc4fd7ff66eb51f5d60 Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Fri, 22 Mar 2019 13:08:51 +0100 Subject: [PATCH 05/10] Remove debug code --- resources/qml/WelcomePages/StepPanel.qml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/resources/qml/WelcomePages/StepPanel.qml b/resources/qml/WelcomePages/StepPanel.qml index 1ec44571b5..551a01687a 100644 --- a/resources/qml/WelcomePages/StepPanel.qml +++ b/resources/qml/WelcomePages/StepPanel.qml @@ -72,10 +72,6 @@ Item { currentStep = page_index } - else - { - console.log("Error: cannot find page with page_id = [", page_id, "]") - } } onVisibleChanged: From 1f75d00cd30755ce8684142bdfac8d7cd1f256e2 Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Fri, 22 Mar 2019 13:10:31 +0100 Subject: [PATCH 06/10] Adapt add-by-ip-qml to handle unresponsive address. [CURA-6294] --- .../WelcomePages/AddPrinterByIpContent.qml | 26 ++++++++++++++++--- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/resources/qml/WelcomePages/AddPrinterByIpContent.qml b/resources/qml/WelcomePages/AddPrinterByIpContent.qml index c67e93c9a7..6a90dce1f7 100644 --- a/resources/qml/WelcomePages/AddPrinterByIpContent.qml +++ b/resources/qml/WelcomePages/AddPrinterByIpContent.qml @@ -20,6 +20,7 @@ Item property bool hasSentRequest: false property bool haveConnection: false + property bool deviceUnresponsive: false Label { @@ -75,12 +76,14 @@ Item anchors.right: addPrinterButton.left anchors.margins: UM.Theme.getSize("default_margin").width font: UM.Theme.getFont("default") + selectByMouse: true validator: RegExpValidator { regExp: /[a-fA-F0-9\.\:]*/ } + enabled: { ! (addPrinterByIpScreen.hasSentRequest || addPrinterByIpScreen.haveConnection) } onAccepted: addPrinterButton.clicked() } @@ -99,6 +102,7 @@ Item if (hostnameField.text.trim() != "") { enabled = false; + addPrinterByIpScreen.deviceUnresponsive = false; UM.OutputDeviceManager.addManualDevice(hostnameField.text, hostnameField.text); } } @@ -135,8 +139,22 @@ Item anchors.margins: UM.Theme.getSize("default_margin").width font: UM.Theme.getFont("default") - visible: { addPrinterByIpScreen.hasSentRequest && ! addPrinterByIpScreen.haveConnection } - text: catalog.i18nc("@label", "The printer at this address has not responded yet.") + visible: + { + (addPrinterByIpScreen.hasSentRequest && ! addPrinterByIpScreen.haveConnection) + || addPrinterByIpScreen.deviceUnresponsive + } + text: + { + if (addPrinterByIpScreen.deviceUnresponsive) + { + catalog.i18nc("@label", "Could not connect to device.") + } + else + { + catalog.i18nc("@label", "The printer at this address has not responded yet.") + } + } } Rectangle @@ -145,7 +163,7 @@ Item anchors.top: parent.top anchors.margins: UM.Theme.getSize("default_margin").width - visible: addPrinterByIpScreen.haveConnection + visible: addPrinterByIpScreen.haveConnection && ! addPrinterByIpScreen.deviceUnresponsive Label { @@ -206,9 +224,9 @@ Item } else { - printerNameLabel.text = catalog.i18nc("@label", "Could not connect to device.") addPrinterByIpScreen.hasSentRequest = false addPrinterByIpScreen.haveConnection = false + addPrinterByIpScreen.deviceUnresponsive = true } } } From eb02b302f53ecd359c8f3d9a83b701c34ef0a042 Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Fri, 22 Mar 2019 13:18:33 +0100 Subject: [PATCH 07/10] Rearrange items in DataCollectionsContent.qml --- .../WelcomePages/DataCollectionsContent.qml | 47 +++++++++++-------- 1 file changed, 28 insertions(+), 19 deletions(-) diff --git a/resources/qml/WelcomePages/DataCollectionsContent.qml b/resources/qml/WelcomePages/DataCollectionsContent.qml index a9af056288..b17c24300a 100644 --- a/resources/qml/WelcomePages/DataCollectionsContent.qml +++ b/resources/qml/WelcomePages/DataCollectionsContent.qml @@ -28,30 +28,39 @@ Item renderType: Text.NativeRendering } - Column + // Area where the cloud contents can be put. Pictures, texts and such. + Item { + id: cloudContentsArea anchors.top: titleLabel.bottom - anchors.topMargin: 80 - anchors.horizontalCenter: parent.horizontalCenter + anchors.bottom: getStartedButton.top + anchors.left: parent.left + anchors.right: parent.right + anchors.margins: UM.Theme.getSize("default_margin").width - spacing: 60 - - Image + Column { - id: curaImage - anchors.horizontalCenter: parent.horizontalCenter - source: UM.Theme.getImage("first_run_share_data") - } + anchors.centerIn: parent - Label - { - id: textLabel - anchors.horizontalCenter: parent.horizontalCenter - horizontalAlignment: Text.AlignHCenter - text: catalog.i18nc("@text", "Ultimaker Cura collects anonymous data to improve print quality
and user experience. More information") - textFormat: Text.RichText - font: UM.Theme.getFont("medium") - renderType: Text.NativeRendering + spacing: UM.Theme.getSize("welcome_pages_default_margin").height + + Image + { + id: curaImage + anchors.horizontalCenter: parent.horizontalCenter + source: UM.Theme.getImage("first_run_share_data") + } + + Label + { + id: textLabel + anchors.horizontalCenter: parent.horizontalCenter + horizontalAlignment: Text.AlignHCenter + text: catalog.i18nc("@text", "Ultimaker Cura collects anonymous data to improve print quality
and user experience. More information") + textFormat: Text.RichText + font: UM.Theme.getFont("medium") + renderType: Text.NativeRendering + } } } From 8de055dd33170969cc57ec52cbbaea702750e163 Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Fri, 22 Mar 2019 13:19:19 +0100 Subject: [PATCH 08/10] Adjust add-by-ip to latest review comments. [CURA-6294] --- resources/qml/WelcomePages/AddPrinterByIpContent.qml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/resources/qml/WelcomePages/AddPrinterByIpContent.qml b/resources/qml/WelcomePages/AddPrinterByIpContent.qml index 6a90dce1f7..034ee74e76 100644 --- a/resources/qml/WelcomePages/AddPrinterByIpContent.qml +++ b/resources/qml/WelcomePages/AddPrinterByIpContent.qml @@ -18,9 +18,9 @@ Item id: addPrinterByIpScreen - property bool hasSentRequest: false - property bool haveConnection: false - property bool deviceUnresponsive: false + property bool hasSentRequest: false // True when a request has been sent to the device at the typed address. + property bool haveConnection: false // True when there is a connection with a machine, it can then be added. + property bool deviceUnresponsive: false // True when a request comes back, but the device hasn't responded. Label { @@ -126,7 +126,7 @@ Item } } - Rectangle + Item { width: parent.width anchors.top: userInputFields.bottom @@ -157,7 +157,7 @@ Item } } - Rectangle + Item { id: printerInfoLabels anchors.top: parent.top From f8c4cee2decc0563eca047b5d793f7257844dd04 Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Fri, 22 Mar 2019 13:47:12 +0100 Subject: [PATCH 09/10] Simplify user agreement page layout --- .../WelcomePages/DataCollectionsContent.qml | 2 +- .../qml/WelcomePages/UserAgreementContent.qml | 71 ++++++++++--------- 2 files changed, 40 insertions(+), 33 deletions(-) diff --git a/resources/qml/WelcomePages/DataCollectionsContent.qml b/resources/qml/WelcomePages/DataCollectionsContent.qml index b17c24300a..2990b16795 100644 --- a/resources/qml/WelcomePages/DataCollectionsContent.qml +++ b/resources/qml/WelcomePages/DataCollectionsContent.qml @@ -31,7 +31,7 @@ Item // Area where the cloud contents can be put. Pictures, texts and such. Item { - id: cloudContentsArea + id: contentsArea anchors.top: titleLabel.bottom anchors.bottom: getStartedButton.top anchors.left: parent.left diff --git a/resources/qml/WelcomePages/UserAgreementContent.qml b/resources/qml/WelcomePages/UserAgreementContent.qml index dfec088ad6..792a4df991 100644 --- a/resources/qml/WelcomePages/UserAgreementContent.qml +++ b/resources/qml/WelcomePages/UserAgreementContent.qml @@ -12,45 +12,52 @@ import Cura 1.1 as Cura // Item { - Column + UM.I18nCatalog { id: catalog; name: "cura" } + + Label { + id: titleLabel anchors.top: parent.top + anchors.topMargin: UM.Theme.getSize("welcome_pages_default_margin").height + anchors.horizontalCenter: parent.horizontalCenter + horizontalAlignment: Text.AlignHCenter + text: catalog.i18nc("@label", "User Agreement") + color: UM.Theme.getColor("primary_button") + font: UM.Theme.getFont("large_bold") + renderType: Text.NativeRendering + } + + + Item + { + anchors.top: titleLabel.bottom + anchors.bottom: agreeButton.top anchors.left: parent.left anchors.right: parent.right - anchors.margins: 20 + anchors.margins: UM.Theme.getSize("welcome_pages_default_margin").width - UM.I18nCatalog { id: catalog; name: "cura" } + Label + { + id: disclaimerLineLabel + /* + anchors.top: titleLabel.bottom + anchors.bottom: agreeButton.top + anchors.horizontalCenter: parent.horizontalCenter + */ + anchors.centerIn: parent + anchors.margins: UM.Theme.getSize("welcome_pages_default_margin").width - spacing: 40 + width: (parent.width * 2 / 3) | 0 - // Placeholder - Label { text: " " } - - Label - { - id: titleLabel - anchors.horizontalCenter: parent.horizontalCenter - horizontalAlignment: Text.AlignHCenter - text: catalog.i18nc("@label", "User Agreement") - color: UM.Theme.getColor("primary_button") - font: UM.Theme.getFont("large_bold") - renderType: Text.NativeRendering - } - - Label - { - width: parent.width * 2 / 3 - id: disclaimerLineLabel - anchors.horizontalCenter: parent.horizontalCenter - text: "

Disclaimer by Ultimaker

" - + "

Please read this disclaimer carefully.

" - + "

Except when otherwise stated in writing, Ultimaker provides any Ultimaker software or third party software \"As is\" without warranty of any kind. The entire risk as to the quality and perfoemance of Ultimaker software is with you.

" - + "

Unless required by applicable law or agreed to in writing, in no event will Ultimaker be liable to you for damages, including any general, special, incidental, or consequential damages arising out of the use or inability to use any Ultimaker software or third party software.

" - textFormat: Text.RichText - wrapMode: Text.WordWrap - font: UM.Theme.getFont("default") - renderType: Text.NativeRendering - } + text: "

Disclaimer by Ultimaker

" + + "

Please read this disclaimer carefully.

" + + "

Except when otherwise stated in writing, Ultimaker provides any Ultimaker software or third party software \"As is\" without warranty of any kind. The entire risk as to the quality and perfoemance of Ultimaker software is with you.

" + + "

Unless required by applicable law or agreed to in writing, in no event will Ultimaker be liable to you for damages, including any general, special, incidental, or consequential damages arising out of the use or inability to use any Ultimaker software or third party software.

" + textFormat: Text.RichText + wrapMode: Text.WordWrap + font: UM.Theme.getFont("default") + renderType: Text.NativeRendering + } } Cura.PrimaryButton From a9431b270f679f6dfd8af20a95efbdbdc0f2bdee Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Fri, 22 Mar 2019 14:19:26 +0100 Subject: [PATCH 10/10] Rearrange items in WelcomeContent.qml --- .../qml/WelcomePages/UserAgreementContent.qml | 38 ++++++------- resources/qml/WelcomePages/WelcomeContent.qml | 54 +++++++++---------- 2 files changed, 43 insertions(+), 49 deletions(-) diff --git a/resources/qml/WelcomePages/UserAgreementContent.qml b/resources/qml/WelcomePages/UserAgreementContent.qml index 792a4df991..583832e906 100644 --- a/resources/qml/WelcomePages/UserAgreementContent.qml +++ b/resources/qml/WelcomePages/UserAgreementContent.qml @@ -27,8 +27,7 @@ Item renderType: Text.NativeRendering } - - Item + Item // Area for pictures and texts { anchors.top: titleLabel.bottom anchors.bottom: agreeButton.top @@ -36,28 +35,23 @@ Item anchors.right: parent.right anchors.margins: UM.Theme.getSize("welcome_pages_default_margin").width - Label - { - id: disclaimerLineLabel - /* - anchors.top: titleLabel.bottom - anchors.bottom: agreeButton.top - anchors.horizontalCenter: parent.horizontalCenter - */ - anchors.centerIn: parent - anchors.margins: UM.Theme.getSize("welcome_pages_default_margin").width + Label + { + id: disclaimerLineLabel + anchors.centerIn: parent + anchors.margins: UM.Theme.getSize("welcome_pages_default_margin").width - width: (parent.width * 2 / 3) | 0 + width: (parent.width * 2 / 3) | 0 - text: "

Disclaimer by Ultimaker

" - + "

Please read this disclaimer carefully.

" - + "

Except when otherwise stated in writing, Ultimaker provides any Ultimaker software or third party software \"As is\" without warranty of any kind. The entire risk as to the quality and perfoemance of Ultimaker software is with you.

" - + "

Unless required by applicable law or agreed to in writing, in no event will Ultimaker be liable to you for damages, including any general, special, incidental, or consequential damages arising out of the use or inability to use any Ultimaker software or third party software.

" - textFormat: Text.RichText - wrapMode: Text.WordWrap - font: UM.Theme.getFont("default") - renderType: Text.NativeRendering - } + text: "

Disclaimer by Ultimaker

" + + "

Please read this disclaimer carefully.

" + + "

Except when otherwise stated in writing, Ultimaker provides any Ultimaker software or third party software \"As is\" without warranty of any kind. The entire risk as to the quality and perfoemance of Ultimaker software is with you.

" + + "

Unless required by applicable law or agreed to in writing, in no event will Ultimaker be liable to you for damages, including any general, special, incidental, or consequential damages arising out of the use or inability to use any Ultimaker software or third party software.

" + textFormat: Text.RichText + wrapMode: Text.WordWrap + font: UM.Theme.getFont("default") + renderType: Text.NativeRendering + } } Cura.PrimaryButton diff --git a/resources/qml/WelcomePages/WelcomeContent.qml b/resources/qml/WelcomePages/WelcomeContent.qml index fe47567da6..2fde182c4c 100644 --- a/resources/qml/WelcomePages/WelcomeContent.qml +++ b/resources/qml/WelcomePages/WelcomeContent.qml @@ -11,30 +11,28 @@ import Cura 1.1 as Cura // // This component contains the content for the "Welcome" page of the welcome on-boarding process. // -Column +Item { UM.I18nCatalog { id: catalog; name: "cura" } - spacing: 60 + anchors.margins: UM.Theme.getSize("welcome_pages_default_margin").width - // Placeholder - Label { text: " " } - - Label + Column // Arrange the items vertically and put everything in the center { - id: titleLabel - anchors.horizontalCenter: parent.horizontalCenter - horizontalAlignment: Text.AlignHCenter - text: catalog.i18nc("@label", "Welcome to Ultimaker Cura") - color: UM.Theme.getColor("primary_button") - font: UM.Theme.getFont("large_bold") - renderType: Text.NativeRendering - } + anchors.centerIn: parent + width: parent.width + spacing: UM.Theme.getSize("welcome_pages_default_margin").height - Column - { - anchors.horizontalCenter: parent.horizontalCenter - spacing: 40 + Label + { + id: titleLabel + anchors.horizontalCenter: parent.horizontalCenter + horizontalAlignment: Text.AlignHCenter + text: catalog.i18nc("@label", "Welcome to Ultimaker Cura") + color: UM.Theme.getColor("primary_button") + font: UM.Theme.getFont("large_bold") + renderType: Text.NativeRendering + } Image { @@ -52,15 +50,17 @@ Column font: UM.Theme.getFont("medium") renderType: Text.NativeRendering } - } - Cura.PrimaryButton - { - id: getStartedButton - anchors.horizontalCenter: parent.horizontalCenter - text: catalog.i18nc("@button", "Get started") - width: 140 - fixedWidthMode: true - onClicked: base.showNextPage() + Cura.PrimaryButton + { + id: getStartedButton + anchors.top: contentArea.bottom + anchors.horizontalCenter: parent.horizontalCenter + anchors.margins: UM.Theme.getSize("welcome_pages_default_margin").width + text: catalog.i18nc("@button", "Get started") + width: 140 + fixedWidthMode: true + onClicked: base.showNextPage() + } } }