From 5cb67ab8c42f8d24337654c45c4cca16d177a4c3 Mon Sep 17 00:00:00 2001 From: "c.lamboo" Date: Tue, 1 Nov 2022 16:11:34 +0100 Subject: [PATCH 01/17] Add new pages in add-printer flow Pages added - Page to select Ultimaker or third party printer - Page with information how to add Ultimaker printer(s) contributes to CURA-8689 --- cura/UI/AddPrinterPagesModel.py | 2 +- cura/UI/WelcomePagesModel.py | 2 +- ...erContent.qml => AddThirdPartyPrinter.qml} | 22 +--- .../AddUltimakerOrThirdPartyPrinter.qml | 75 +++++++++++ .../AddUltimakerOrThirdPartyPrinterStack.qml | 55 ++++++++ .../qml/WelcomePages/AddUltimakerPrinter.qml | 122 ++++++++++++++++++ resources/qml/WelcomePages/PrinterCard.qml | 85 ++++++++++++ 7 files changed, 343 insertions(+), 20 deletions(-) rename resources/qml/WelcomePages/{AddNetworkOrLocalPrinterContent.qml => AddThirdPartyPrinter.qml} (86%) create mode 100644 resources/qml/WelcomePages/AddUltimakerOrThirdPartyPrinter.qml create mode 100644 resources/qml/WelcomePages/AddUltimakerOrThirdPartyPrinterStack.qml create mode 100644 resources/qml/WelcomePages/AddUltimakerPrinter.qml create mode 100644 resources/qml/WelcomePages/PrinterCard.qml diff --git a/cura/UI/AddPrinterPagesModel.py b/cura/UI/AddPrinterPagesModel.py index 9b35dbcacc..1962a6e2ec 100644 --- a/cura/UI/AddPrinterPagesModel.py +++ b/cura/UI/AddPrinterPagesModel.py @@ -12,7 +12,7 @@ class AddPrinterPagesModel(WelcomePagesModel): def initialize(self, cancellable: bool = True) -> None: self._pages.append({"id": "add_network_or_local_printer", - "page_url": self._getBuiltinWelcomePagePath("AddNetworkOrLocalPrinterContent.qml"), + "page_url": self._getBuiltinWelcomePagePath("AddUltimakerOrThirdPartyPrinterStack.qml"), "next_page_id": "machine_actions", "next_page_button_text": self._catalog.i18nc("@action:button", "Add"), }) diff --git a/cura/UI/WelcomePagesModel.py b/cura/UI/WelcomePagesModel.py index 26c27418cf..5faf39311e 100644 --- a/cura/UI/WelcomePagesModel.py +++ b/cura/UI/WelcomePagesModel.py @@ -265,7 +265,7 @@ class WelcomePagesModel(ListModel): "should_show_function": self.shouldShowCloudPage, }, {"id": "add_network_or_local_printer", - "page_url": self._getBuiltinWelcomePagePath("AddNetworkOrLocalPrinterContent.qml"), + "page_url": self._getBuiltinWelcomePagePath("AddUltimakerOrThirdPartyPrinterStack.qml"), "next_page_id": "machine_actions", }, {"id": "add_printer_by_ip", diff --git a/resources/qml/WelcomePages/AddNetworkOrLocalPrinterContent.qml b/resources/qml/WelcomePages/AddThirdPartyPrinter.qml similarity index 86% rename from resources/qml/WelcomePages/AddNetworkOrLocalPrinterContent.qml rename to resources/qml/WelcomePages/AddThirdPartyPrinter.qml index 83a38eab7a..df7a2a176d 100644 --- a/resources/qml/WelcomePages/AddNetworkOrLocalPrinterContent.qml +++ b/resources/qml/WelcomePages/AddThirdPartyPrinter.qml @@ -15,22 +15,13 @@ Item { UM.I18nCatalog { id: catalog; name: "cura" } - UM.Label - { - id: titleLabel - anchors.top: parent.top - anchors.horizontalCenter: parent.horizontalCenter - horizontalAlignment: Text.AlignHCenter - text: catalog.i18nc("@label", "Add a printer") - color: UM.Theme.getColor("primary_button") - font: UM.Theme.getFont("huge") - } + property var goToUltimakerPrinter DropDownWidget { id: addNetworkPrinterDropDown - anchors.top: titleLabel.bottom + anchors.top: parent.top anchors.left: parent.left anchors.right: parent.right anchors.topMargin: UM.Theme.getSize("wide_margin").height @@ -103,18 +94,13 @@ Item } } - // This "Back" button only shows in the "Add Machine" dialog, which has "previous_page_button_text" set to "Cancel" Cura.SecondaryButton { id: backButton anchors.left: parent.left anchors.bottom: parent.bottom - visible: base.currentItem.previous_page_button_text ? true : false - text: base.currentItem.previous_page_button_text ? base.currentItem.previous_page_button_text : "" - onClicked: - { - base.endWizard() - } + text: catalog.i18nc("@label", "Add Ultimaker printer via Digital Factory") + onClicked: goToUltimakerPrinter() } Cura.PrimaryButton diff --git a/resources/qml/WelcomePages/AddUltimakerOrThirdPartyPrinter.qml b/resources/qml/WelcomePages/AddUltimakerOrThirdPartyPrinter.qml new file mode 100644 index 0000000000..c56ef6be4c --- /dev/null +++ b/resources/qml/WelcomePages/AddUltimakerOrThirdPartyPrinter.qml @@ -0,0 +1,75 @@ +// Copyright (c) 2022 Ultimaker B.V. +// Cura is released under the terms of the LGPLv3 or higher. + +import QtQuick 2.10 +import QtQuick.Controls 2.3 +import QtQuick.Layouts 1.3 + +import UM 1.5 as UM +import Cura 1.1 as Cura + + +// +// This component contains the content for the "Add a printer" (network) page of the welcome on-boarding process. +// +Control +{ + UM.I18nCatalog { id: catalog; name: "cura" } + + property var goToUltimakerPrinter + property var goToThirdPartyPrinter + + contentItem: ColumnLayout + { + Layout.fillWidth: true + Layout.fillHeight: true + + UM.Label + { + text: catalog.i18nc("@label", "In order to start using Cura you will need to configure a printer.") + font: UM.Theme.getFont("default") + Layout.alignment: Qt.AlignTop + } + + UM.Label + { + text: catalog.i18nc("@label", "What printer would you like to setup?") + font: UM.Theme.getFont("default_bold") + Layout.alignment: Qt.AlignTop + } + + RowLayout + { + spacing: UM.Theme.getSize("wide_margin").width + Layout.preferredWidth: childrenRect.width + Layout.preferredHeight: childrenRect.height + Layout.topMargin: UM.Theme.getSize("wide_margin").height + Layout.bottomMargin: UM.Theme.getSize("wide_margin").height + Layout.alignment: Qt.AlignTop | Qt.AlignHCenter + + PrinterCard + { + onClicked: goToUltimakerPrinter + text: catalog.i18nc("@button", "Ultimaker printer") + imageSource: UM.Theme.getImage("ultimaker_printer") + } + + PrinterCard + { + onClicked: goToThirdPartyPrinter + text: catalog.i18nc("@button", "Non Ultimaker printer") + imageSource: UM.Theme.getImage("third_party_printer") + } + } + + Cura.TertiaryButton + { + Layout.alignment: Qt.AlignBottom + text: catalog.i18nc("@button", "Learn more about adding printers to Cura") + iconSource: UM.Theme.getIcon("LinkExternal") + isIconOnRightSide: true + textFont: UM.Theme.getFont("small") + onClicked: Qt.openUrlExternally("") // TODO: Update url + } + } +} \ No newline at end of file diff --git a/resources/qml/WelcomePages/AddUltimakerOrThirdPartyPrinterStack.qml b/resources/qml/WelcomePages/AddUltimakerOrThirdPartyPrinterStack.qml new file mode 100644 index 0000000000..104a0cc96b --- /dev/null +++ b/resources/qml/WelcomePages/AddUltimakerOrThirdPartyPrinterStack.qml @@ -0,0 +1,55 @@ +// Copyright (c) 2022 Ultimaker B.V. +// Cura is released under the terms of the LGPLv3 or higher. + +import QtQuick 2.10 +import QtQuick.Controls 2.3 +import QtQuick.Layouts 1.3 + +import UM 1.5 as UM +import Cura 1.1 as Cura + +ColumnLayout +{ + id: root + + UM.I18nCatalog { id: catalog; name: "cura" } + + Layout.fillWidth: true + Layout.fillHeight: true + + property var goToUltimakerPrinter: () => layout.currentIndex = 1 + property var goToThirdPartyPrinter: () => layout.currentIndex = 2 + + UM.Label + { + id: title_label + Layout.fillWidth: true + Layout.bottomMargin: UM.Theme.getSize("thick_margin").height + horizontalAlignment: Text.AlignHCenter + text: catalog.i18nc("@label", "Add printer") + color: UM.Theme.getColor("primary_button") + font: UM.Theme.getFont("huge") + } + + StackLayout + { + id: layout + Layout.fillWidth: true + Layout.fillHeight: true + currentIndex: 0 + AddUltimakerOrThirdPartyPrinter + { + goToUltimakerPrinter: root.goToUltimakerPrinter + goToThirdPartyPrinter: root.goToThirdPartyPrinter + } + AddUltimakerPrinter + { + goToThirdPartyPrinter: root.goToThirdPartyPrinter + } + AddThirdPartyPrinter + { + goToUltimakerPrinter: root.goToUltimakerPrinter + + } + } +} \ No newline at end of file diff --git a/resources/qml/WelcomePages/AddUltimakerPrinter.qml b/resources/qml/WelcomePages/AddUltimakerPrinter.qml new file mode 100644 index 0000000000..eb521acf91 --- /dev/null +++ b/resources/qml/WelcomePages/AddUltimakerPrinter.qml @@ -0,0 +1,122 @@ +// Copyright (c) 2022 Ultimaker B.V. +// Cura is released under the terms of the LGPLv3 or higher. + +import QtQuick 2.10 +import QtQuick.Controls 2.3 +import QtQuick.Layouts 1.3 + +import UM 1.5 as UM +import Cura 1.1 as Cura + +Control +{ + UM.I18nCatalog { id: catalog; name: "cura" } + + property var goToThirdPartyPrinter + + signal cloudPrintersDetected(bool newCloudPrintersDetected) + Component.onCompleted: CuraApplication.getDiscoveredCloudPrintersModel().cloudPrintersDetectedChanged.connect(cloudPrintersDetected) + onCloudPrintersDetected: function(newCloudPrintersDetected) + { + if(newCloudPrintersDetected) + { + base.goToPage("add_cloud_printers") + } + else + { + goToThirdPartyPrinter() + } + } + + contentItem: ColumnLayout + { + UM.Label + { + text: catalog.i18nc("@label", "New Ultimaker printers can be connected to Digital Factory and monitored remotely.") + } + + RowLayout + { + Layout.fillWidth: true + + Image + { + source: UM.Theme.getImage("add_printer") + Layout.preferredWidth: 200 + Layout.preferredHeight: 200 + } + + ColumnLayout + { + Layout.fillHeight: true + Layout.alignment: Qt.AlignVCenter + spacing: UM.Theme.getSize("default_margin").height + + UM.Label + { + Layout.fillWidth: true + Layout.alignment: Qt.AlignTop + wrapMode: Text.WordWrap + font: UM.Theme.getFont("default_bold") + text: catalog.i18nc("@label", "New Ultimaker printers can be connected to Digital Factory and monitored remotely.") + } + + UM.Label + { + Layout.fillWidth: true + Layout.alignment: Qt.AlignTop + wrapMode: Text.WordWrap + text: { + const steps = [ + catalog.i18nc("@info", "Sign in into Ultimaker Digilal Factory"), + catalog.i18nc("@info", "Follow the procedure to add a new printer"), + catalog.i18nc("@info", "Your new printer will automatically appear in Cura"), + ]; + return `
    ${steps.map(step => `
  1. ${step}`).join('')}
`; + } + } + + Cura.TertiaryButton + { + Layout.fillWidth: true + Layout.alignment: Qt.AlignTop + text: catalog.i18nc("@button", "Learn more about adding printers to Digital Factory") + iconSource: UM.Theme.getIcon("LinkExternal") + isIconOnRightSide: true + textFont: UM.Theme.getFont("small") + onClicked: Qt.openUrlExternally("") // TODO: Update url + } + } + } + + Control + { + Layout.alignment: Qt.AlignBottom + Layout.fillWidth: true + + contentItem: RowLayout + { + + Cura.SecondaryButton + { + Layout.alignment: Qt.AlignLeft + text: catalog.i18nc("@button", "Add local printer") + onClicked: goToThirdPartyPrinter() + } + + Cura.PrimaryButton + { + Layout.alignment: Qt.AlignRight + text: catalog.i18nc("@button", "Sign in to Digital Factory") + onClicked: function() + { + text = catalog.i18nc("@button", "Waiting for new printers") + busy = true; + enabled = false; + Cura.API.account.login(); + } + } + } + } + } +} \ No newline at end of file diff --git a/resources/qml/WelcomePages/PrinterCard.qml b/resources/qml/WelcomePages/PrinterCard.qml new file mode 100644 index 0000000000..2b29d2279e --- /dev/null +++ b/resources/qml/WelcomePages/PrinterCard.qml @@ -0,0 +1,85 @@ +// Copyright (c) 2022 Ultimaker B.V. +// Cura is released under the terms of the LGPLv3 or higher. + +import QtQuick 2.10 +import QtQuick.Controls 2.3 +import QtQuick.Layouts 1.3 + +import UM 1.5 as UM +import Cura 1.1 as Cura + +Control +{ + id: root + property alias text: link_text.text + property alias imageSource: image.source + property var onClicked + + states: + [ + State + { + name: "hovered"; + when: mouse_area.containsMouse + PropertyChanges + { + target: background + color: UM.Theme.getColor("monitor_card_hover") + } + PropertyChanges + { + target: link_text + font.underline: true + } + } + ] + + MouseArea + { + id: mouse_area + anchors.fill: parent + hoverEnabled: true + onClicked: root.onClicked && root.onClicked() + } + + topPadding: UM.Theme.getSize("wide_margin").height + rightPadding: UM.Theme.getSize("wide_margin").width + bottomPadding: UM.Theme.getSize("wide_margin").height + leftPadding: UM.Theme.getSize("wide_margin").width + + background: Rectangle + { + id: background + anchors.fill: parent + border.color: UM.Theme.getColor("primary_button") + color: "transparent" + border.width: 1 + radius: 3 + } + + contentItem: ColumnLayout + { + spacing: UM.Theme.getSize("wide_margin").height + height: childrenRect.height + width: childrenRect.width + + Image + { + id: image + source: imageSource + width: 180 + height: 180 + sourceSize.width: width + sourceSize.height: height + } + + UM.Label + { + id: link_text + Layout.fillWidth: true + font: UM.Theme.getFont("medium") + color: UM.Theme.getColor("text_link") + horizontalAlignment: Text.AlignHCenter + } + } +} From 846102be4e270af956eaee339bd758a4fd8735fb Mon Sep 17 00:00:00 2001 From: "c.lamboo" Date: Tue, 1 Nov 2022 16:59:25 +0100 Subject: [PATCH 02/17] Update campaign links in onboarding-add printer flow contributes to CURA-8689 --- resources/qml/WelcomePages/AddUltimakerOrThirdPartyPrinter.qml | 2 +- resources/qml/WelcomePages/AddUltimakerPrinter.qml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/qml/WelcomePages/AddUltimakerOrThirdPartyPrinter.qml b/resources/qml/WelcomePages/AddUltimakerOrThirdPartyPrinter.qml index c56ef6be4c..01b375f66d 100644 --- a/resources/qml/WelcomePages/AddUltimakerOrThirdPartyPrinter.qml +++ b/resources/qml/WelcomePages/AddUltimakerOrThirdPartyPrinter.qml @@ -69,7 +69,7 @@ Control iconSource: UM.Theme.getIcon("LinkExternal") isIconOnRightSide: true textFont: UM.Theme.getFont("small") - onClicked: Qt.openUrlExternally("") // TODO: Update url + onClicked: Qt.openUrlExternally("https://support.ultimaker.com/hc/en-us/articles/360012019239?utm_source=cura&utm_medium=software&utm_campaign=onboarding-add-printer") } } } \ No newline at end of file diff --git a/resources/qml/WelcomePages/AddUltimakerPrinter.qml b/resources/qml/WelcomePages/AddUltimakerPrinter.qml index eb521acf91..3566600159 100644 --- a/resources/qml/WelcomePages/AddUltimakerPrinter.qml +++ b/resources/qml/WelcomePages/AddUltimakerPrinter.qml @@ -84,7 +84,7 @@ Control iconSource: UM.Theme.getIcon("LinkExternal") isIconOnRightSide: true textFont: UM.Theme.getFont("small") - onClicked: Qt.openUrlExternally("") // TODO: Update url + onClicked: Qt.openUrlExternally("https://support.ultimaker.com/hc/en-us/articles/360012019239?utm_source=cura&utm_medium=software&utm_campaign=onboarding-add-printer") } } } From 056221cda60caec3686a9846477d7d4d754f5594 Mon Sep 17 00:00:00 2001 From: "c.lamboo" Date: Tue, 1 Nov 2022 17:00:40 +0100 Subject: [PATCH 03/17] Remove "Add cloud printer" button in onboarding-add printer flow From figma design contributes to CURA-8689 --- .../WelcomePages/AddNetworkPrinterScrollView.qml | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/resources/qml/WelcomePages/AddNetworkPrinterScrollView.qml b/resources/qml/WelcomePages/AddNetworkPrinterScrollView.qml index 36c670f462..3d138e3d2e 100644 --- a/resources/qml/WelcomePages/AddNetworkPrinterScrollView.qml +++ b/resources/qml/WelcomePages/AddNetworkPrinterScrollView.qml @@ -175,21 +175,6 @@ Item onClicked: base.addByIpButtonClicked() } - Cura.SecondaryButton - { - id: addCloudPrinterButton - anchors.left: addPrinterByIpButton.right - anchors.leftMargin: UM.Theme.getSize("default_margin").width - anchors.verticalCenter: parent.verticalCenter - text: catalog.i18nc("@label", "Add cloud printer") - height: UM.Theme.getSize("message_action_button").height - onClicked: { - CuraApplication.getDiscoveredCloudPrintersModel().clear() - Cura.API.account.sync(true) - base.addCloudPrinterButtonClicked() - } - } - Item { id: troubleshootingButton From 1ebc0b487e1a812cffbb254133881e4e11d9d221 Mon Sep 17 00:00:00 2001 From: "c.lamboo" Date: Wed, 2 Nov 2022 13:54:00 +0100 Subject: [PATCH 04/17] Add various assets welcome-page assets contributes to CURA-8689 --- resources/themes/cura-light/images/add_printer.svg | 1 + resources/themes/cura-light/images/third_party_printer.svg | 2 ++ resources/themes/cura-light/images/ultimaker_printer.svg | 1 + 3 files changed, 4 insertions(+) create mode 100644 resources/themes/cura-light/images/add_printer.svg create mode 100644 resources/themes/cura-light/images/third_party_printer.svg create mode 100644 resources/themes/cura-light/images/ultimaker_printer.svg diff --git a/resources/themes/cura-light/images/add_printer.svg b/resources/themes/cura-light/images/add_printer.svg new file mode 100644 index 0000000000..3d814f48ef --- /dev/null +++ b/resources/themes/cura-light/images/add_printer.svg @@ -0,0 +1 @@ + diff --git a/resources/themes/cura-light/images/third_party_printer.svg b/resources/themes/cura-light/images/third_party_printer.svg new file mode 100644 index 0000000000..d2444d2d28 --- /dev/null +++ b/resources/themes/cura-light/images/third_party_printer.svg @@ -0,0 +1,2 @@ + + diff --git a/resources/themes/cura-light/images/ultimaker_printer.svg b/resources/themes/cura-light/images/ultimaker_printer.svg new file mode 100644 index 0000000000..f2184d4bd1 --- /dev/null +++ b/resources/themes/cura-light/images/ultimaker_printer.svg @@ -0,0 +1 @@ + From 1dfac6bb71ad893ee6455168952ba210b09c2732 Mon Sep 17 00:00:00 2001 From: jelle spijker Date: Wed, 2 Nov 2022 14:00:35 +0100 Subject: [PATCH 05/17] Apply screenScaleFactor to image size Contributes to CURA-8689 --- resources/qml/WelcomePages/AddUltimakerPrinter.qml | 6 +++--- resources/qml/WelcomePages/PrinterCard.qml | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/resources/qml/WelcomePages/AddUltimakerPrinter.qml b/resources/qml/WelcomePages/AddUltimakerPrinter.qml index 3566600159..e1cb0d7120 100644 --- a/resources/qml/WelcomePages/AddUltimakerPrinter.qml +++ b/resources/qml/WelcomePages/AddUltimakerPrinter.qml @@ -42,8 +42,8 @@ Control Image { source: UM.Theme.getImage("add_printer") - Layout.preferredWidth: 200 - Layout.preferredHeight: 200 + Layout.preferredWidth: 200 * screenScaleFactor + Layout.preferredHeight: 200 * screenScaleFactor } ColumnLayout @@ -119,4 +119,4 @@ Control } } } -} \ No newline at end of file +} diff --git a/resources/qml/WelcomePages/PrinterCard.qml b/resources/qml/WelcomePages/PrinterCard.qml index 2b29d2279e..6b0a5bb526 100644 --- a/resources/qml/WelcomePages/PrinterCard.qml +++ b/resources/qml/WelcomePages/PrinterCard.qml @@ -67,8 +67,8 @@ Control { id: image source: imageSource - width: 180 - height: 180 + width: 180 * screenScaleFactor + height: 180 * screenScaleFactor sourceSize.width: width sourceSize.height: height } From 975775b7a03f8c7e88e003e721662a5c65f35bf5 Mon Sep 17 00:00:00 2001 From: "c.lamboo" Date: Wed, 2 Nov 2022 14:15:37 +0100 Subject: [PATCH 06/17] Add various dark-mode welcome-page assets contributes to CURA-8689 --- .../themes/cura-dark/images/add_printer.svg | 53 ++++++++++++++++ .../cura-dark/images/third_party_printer.svg | 60 +++++++++++++++++++ .../cura-dark/images/ultimaker_printer.svg | 35 +++++++++++ 3 files changed, 148 insertions(+) create mode 100644 resources/themes/cura-dark/images/add_printer.svg create mode 100644 resources/themes/cura-dark/images/third_party_printer.svg create mode 100644 resources/themes/cura-dark/images/ultimaker_printer.svg diff --git a/resources/themes/cura-dark/images/add_printer.svg b/resources/themes/cura-dark/images/add_printer.svg new file mode 100644 index 0000000000..06f838bc76 --- /dev/null +++ b/resources/themes/cura-dark/images/add_printer.svg @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/themes/cura-dark/images/third_party_printer.svg b/resources/themes/cura-dark/images/third_party_printer.svg new file mode 100644 index 0000000000..6ffe5c20f3 --- /dev/null +++ b/resources/themes/cura-dark/images/third_party_printer.svg @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/themes/cura-dark/images/ultimaker_printer.svg b/resources/themes/cura-dark/images/ultimaker_printer.svg new file mode 100644 index 0000000000..e5a99a6e5c --- /dev/null +++ b/resources/themes/cura-dark/images/ultimaker_printer.svg @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 4381a97c85de02d1b29a30fa7e634b0234b61b33 Mon Sep 17 00:00:00 2001 From: "c.lamboo" Date: Wed, 2 Nov 2022 14:58:25 +0100 Subject: [PATCH 07/17] Elide button text when text becomes too wide contributes to CURA-8689 --- resources/qml/WelcomePages/AddUltimakerPrinter.qml | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/qml/WelcomePages/AddUltimakerPrinter.qml b/resources/qml/WelcomePages/AddUltimakerPrinter.qml index e1cb0d7120..af3b506b76 100644 --- a/resources/qml/WelcomePages/AddUltimakerPrinter.qml +++ b/resources/qml/WelcomePages/AddUltimakerPrinter.qml @@ -84,6 +84,7 @@ Control iconSource: UM.Theme.getIcon("LinkExternal") isIconOnRightSide: true textFont: UM.Theme.getFont("small") + fixedWidthMode: true onClicked: Qt.openUrlExternally("https://support.ultimaker.com/hc/en-us/articles/360012019239?utm_source=cura&utm_medium=software&utm_campaign=onboarding-add-printer") } } From c8f51a67431d16cd93844d2f9dde4be004959ce4 Mon Sep 17 00:00:00 2001 From: jelle spijker Date: Thu, 3 Nov 2022 10:08:00 +0100 Subject: [PATCH 08/17] Correctly wrap text body to prevent weird alignment in welcome pages CURA-8689 --- resources/qml/WelcomePages/AddUltimakerPrinter.qml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/resources/qml/WelcomePages/AddUltimakerPrinter.qml b/resources/qml/WelcomePages/AddUltimakerPrinter.qml index af3b506b76..92f79e00ba 100644 --- a/resources/qml/WelcomePages/AddUltimakerPrinter.qml +++ b/resources/qml/WelcomePages/AddUltimakerPrinter.qml @@ -32,7 +32,9 @@ Control { UM.Label { + Layout.fillWidth: true text: catalog.i18nc("@label", "New Ultimaker printers can be connected to Digital Factory and monitored remotely.") + wrapMode: Text.WordWrap } RowLayout @@ -84,7 +86,6 @@ Control iconSource: UM.Theme.getIcon("LinkExternal") isIconOnRightSide: true textFont: UM.Theme.getFont("small") - fixedWidthMode: true onClicked: Qt.openUrlExternally("https://support.ultimaker.com/hc/en-us/articles/360012019239?utm_source=cura&utm_medium=software&utm_campaign=onboarding-add-printer") } } From d07c2c2c0da6d714187ffb37965a58a211ed8df4 Mon Sep 17 00:00:00 2001 From: "c.lamboo" Date: Thu, 3 Nov 2022 10:37:02 +0100 Subject: [PATCH 09/17] Update copy contributes to CURA-8689 --- resources/qml/WelcomePages/AddUltimakerPrinter.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/qml/WelcomePages/AddUltimakerPrinter.qml b/resources/qml/WelcomePages/AddUltimakerPrinter.qml index 92f79e00ba..0d99b85b51 100644 --- a/resources/qml/WelcomePages/AddUltimakerPrinter.qml +++ b/resources/qml/WelcomePages/AddUltimakerPrinter.qml @@ -60,7 +60,7 @@ Control Layout.alignment: Qt.AlignTop wrapMode: Text.WordWrap font: UM.Theme.getFont("default_bold") - text: catalog.i18nc("@label", "New Ultimaker printers can be connected to Digital Factory and monitored remotely.") + text: catalog.i18nc("@label", "If you are trying to add a new Ultimaker printer to Cura") } UM.Label @@ -82,7 +82,7 @@ Control { Layout.fillWidth: true Layout.alignment: Qt.AlignTop - text: catalog.i18nc("@button", "Learn more about adding printers to Digital Factory") + text: catalog.i18nc("@button", "Learn more") iconSource: UM.Theme.getIcon("LinkExternal") isIconOnRightSide: true textFont: UM.Theme.getFont("small") From c892bac27f8f763f8d829ab0f91a96359ca5b8f4 Mon Sep 17 00:00:00 2001 From: "c.lamboo" Date: Thu, 3 Nov 2022 10:45:29 +0100 Subject: [PATCH 10/17] Use paragraph for in favor of ordered list Text indentation became when the text would span multiple lines contributes to CURA-8689 --- resources/qml/WelcomePages/AddUltimakerPrinter.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/qml/WelcomePages/AddUltimakerPrinter.qml b/resources/qml/WelcomePages/AddUltimakerPrinter.qml index 0d99b85b51..9c9154f3b3 100644 --- a/resources/qml/WelcomePages/AddUltimakerPrinter.qml +++ b/resources/qml/WelcomePages/AddUltimakerPrinter.qml @@ -74,7 +74,7 @@ Control catalog.i18nc("@info", "Follow the procedure to add a new printer"), catalog.i18nc("@info", "Your new printer will automatically appear in Cura"), ]; - return `
    ${steps.map(step => `
  1. ${step}`).join('')}
`; + return steps.join("
"); } } From 6ddc16709b4dcb9b6b2214ad36918dbe1c191b55 Mon Sep 17 00:00:00 2001 From: jelle spijker Date: Fri, 4 Nov 2022 10:13:41 +0100 Subject: [PATCH 11/17] Use GCC12 as default for all Linux runners --- .github/workflows/conan-package-create.yml | 4 ++-- .github/workflows/cura-installer.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/conan-package-create.yml b/.github/workflows/conan-package-create.yml index 4af608b7ac..f76394a4ae 100644 --- a/.github/workflows/conan-package-create.yml +++ b/.github/workflows/conan-package-create.yml @@ -108,8 +108,8 @@ jobs: sudo apt upgrade sudo apt install build-essential checkinstall libegl-dev zlib1g-dev libssl-dev ninja-build autoconf libx11-dev libx11-xcb-dev libfontenc-dev libice-dev libsm-dev libxau-dev libxaw7-dev libxcomposite-dev libxcursor-dev libxdamage-dev libxdmcp-dev libxext-dev libxfixes-dev libxi-dev libxinerama-dev libxkbfile-dev libxmu-dev libxmuu-dev libxpm-dev libxrandr-dev libxrender-dev libxres-dev libxss-dev libxt-dev libxtst-dev libxv-dev libxvmc-dev libxxf86vm-dev xtrans-dev libxcb-render0-dev libxcb-render-util0-dev libxcb-xkb-dev libxcb-icccm4-dev libxcb-image0-dev libxcb-keysyms1-dev libxcb-randr0-dev libxcb-shape0-dev libxcb-sync-dev libxcb-xfixes0-dev libxcb-xinerama0-dev xkb-data libxcb-dri3-dev uuid-dev libxcb-util-dev libxkbcommon-x11-dev pkg-config -y - - name: Install GCC-12 on ubuntu-22.04 - if: ${{ startsWith(inputs.runs_on, 'ubuntu-22.04') }} + - name: Install GCC-12 on ubuntu + if: ${{ runner.os == 'Linux' }} run: | sudo apt install g++-12 gcc-12 -y sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 12 diff --git a/.github/workflows/cura-installer.yml b/.github/workflows/cura-installer.yml index 99d12a5057..2c2287433f 100644 --- a/.github/workflows/cura-installer.yml +++ b/.github/workflows/cura-installer.yml @@ -127,7 +127,7 @@ jobs: echo "APPIMAGETOOL_LOCATION=$GITHUB_WORKSPACE/appimagetool" >> $GITHUB_ENV - name: Install GCC-12 on ubuntu-22.04 - if: ${{ matrix.os == 'ubuntu-22.04' }} + if: ${{ runner.os == 'Linux' }} run: | sudo apt install g++-12 gcc-12 -y sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 12 From 81f8939c1f3395b444d0ec1784895aba87d0f3a2 Mon Sep 17 00:00:00 2001 From: Casper Lamboo Date: Fri, 4 Nov 2022 13:40:49 +0100 Subject: [PATCH 12/17] Update resources/qml/WelcomePages/AddThirdPartyPrinter.qml Co-authored-by: Joey de l'Arago --- resources/qml/WelcomePages/AddThirdPartyPrinter.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/qml/WelcomePages/AddThirdPartyPrinter.qml b/resources/qml/WelcomePages/AddThirdPartyPrinter.qml index df7a2a176d..f25cdccbf1 100644 --- a/resources/qml/WelcomePages/AddThirdPartyPrinter.qml +++ b/resources/qml/WelcomePages/AddThirdPartyPrinter.qml @@ -99,7 +99,7 @@ Item id: backButton anchors.left: parent.left anchors.bottom: parent.bottom - text: catalog.i18nc("@label", "Add Ultimaker printer via Digital Factory") + text: catalog.i18nc("@button", "Add Ultimaker printer via Digital Factory") onClicked: goToUltimakerPrinter() } From c5788be6f7439b81d9d2fc3e704ceb3416d19aa7 Mon Sep 17 00:00:00 2001 From: "c.lamboo" Date: Fri, 4 Nov 2022 13:48:31 +0100 Subject: [PATCH 13/17] Add ids with interactable components Makes it easier to perform automatic ui testing contributes to CURA-8689 --- resources/qml/WelcomePages/AddUltimakerOrThirdPartyPrinter.qml | 3 +++ resources/qml/WelcomePages/AddUltimakerPrinter.qml | 3 +++ 2 files changed, 6 insertions(+) diff --git a/resources/qml/WelcomePages/AddUltimakerOrThirdPartyPrinter.qml b/resources/qml/WelcomePages/AddUltimakerOrThirdPartyPrinter.qml index 01b375f66d..0e88e0373f 100644 --- a/resources/qml/WelcomePages/AddUltimakerOrThirdPartyPrinter.qml +++ b/resources/qml/WelcomePages/AddUltimakerOrThirdPartyPrinter.qml @@ -49,6 +49,7 @@ Control PrinterCard { + id: ultimakerPrinterCard onClicked: goToUltimakerPrinter text: catalog.i18nc("@button", "Ultimaker printer") imageSource: UM.Theme.getImage("ultimaker_printer") @@ -56,6 +57,7 @@ Control PrinterCard { + id: thrirdPartyPrinterCard onClicked: goToThirdPartyPrinter text: catalog.i18nc("@button", "Non Ultimaker printer") imageSource: UM.Theme.getImage("third_party_printer") @@ -64,6 +66,7 @@ Control Cura.TertiaryButton { + id: learnMoreButton Layout.alignment: Qt.AlignBottom text: catalog.i18nc("@button", "Learn more about adding printers to Cura") iconSource: UM.Theme.getIcon("LinkExternal") diff --git a/resources/qml/WelcomePages/AddUltimakerPrinter.qml b/resources/qml/WelcomePages/AddUltimakerPrinter.qml index 9c9154f3b3..a2b08a45b6 100644 --- a/resources/qml/WelcomePages/AddUltimakerPrinter.qml +++ b/resources/qml/WelcomePages/AddUltimakerPrinter.qml @@ -80,6 +80,7 @@ Control Cura.TertiaryButton { + id: learnMoreButton Layout.fillWidth: true Layout.alignment: Qt.AlignTop text: catalog.i18nc("@button", "Learn more") @@ -101,6 +102,7 @@ Control Cura.SecondaryButton { + id: addLocalPrinterButton Layout.alignment: Qt.AlignLeft text: catalog.i18nc("@button", "Add local printer") onClicked: goToThirdPartyPrinter() @@ -108,6 +110,7 @@ Control Cura.PrimaryButton { + id: signInButton Layout.alignment: Qt.AlignRight text: catalog.i18nc("@button", "Sign in to Digital Factory") onClicked: function() From da304aec907a1b731785f7cac45af7b4f5171e97 Mon Sep 17 00:00:00 2001 From: jspijker Date: Mon, 7 Nov 2022 09:13:43 +0100 Subject: [PATCH 14/17] Revert "Use GCC12 as default for all Linux runners" This reverts commit 6ddc16709b4dcb9b6b2214ad36918dbe1c191b55. --- .github/workflows/conan-package-create.yml | 4 ++-- .github/workflows/cura-installer.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/conan-package-create.yml b/.github/workflows/conan-package-create.yml index f76394a4ae..4af608b7ac 100644 --- a/.github/workflows/conan-package-create.yml +++ b/.github/workflows/conan-package-create.yml @@ -108,8 +108,8 @@ jobs: sudo apt upgrade sudo apt install build-essential checkinstall libegl-dev zlib1g-dev libssl-dev ninja-build autoconf libx11-dev libx11-xcb-dev libfontenc-dev libice-dev libsm-dev libxau-dev libxaw7-dev libxcomposite-dev libxcursor-dev libxdamage-dev libxdmcp-dev libxext-dev libxfixes-dev libxi-dev libxinerama-dev libxkbfile-dev libxmu-dev libxmuu-dev libxpm-dev libxrandr-dev libxrender-dev libxres-dev libxss-dev libxt-dev libxtst-dev libxv-dev libxvmc-dev libxxf86vm-dev xtrans-dev libxcb-render0-dev libxcb-render-util0-dev libxcb-xkb-dev libxcb-icccm4-dev libxcb-image0-dev libxcb-keysyms1-dev libxcb-randr0-dev libxcb-shape0-dev libxcb-sync-dev libxcb-xfixes0-dev libxcb-xinerama0-dev xkb-data libxcb-dri3-dev uuid-dev libxcb-util-dev libxkbcommon-x11-dev pkg-config -y - - name: Install GCC-12 on ubuntu - if: ${{ runner.os == 'Linux' }} + - name: Install GCC-12 on ubuntu-22.04 + if: ${{ startsWith(inputs.runs_on, 'ubuntu-22.04') }} run: | sudo apt install g++-12 gcc-12 -y sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 12 diff --git a/.github/workflows/cura-installer.yml b/.github/workflows/cura-installer.yml index 2c2287433f..99d12a5057 100644 --- a/.github/workflows/cura-installer.yml +++ b/.github/workflows/cura-installer.yml @@ -127,7 +127,7 @@ jobs: echo "APPIMAGETOOL_LOCATION=$GITHUB_WORKSPACE/appimagetool" >> $GITHUB_ENV - name: Install GCC-12 on ubuntu-22.04 - if: ${{ runner.os == 'Linux' }} + if: ${{ matrix.os == 'ubuntu-22.04' }} run: | sudo apt install g++-12 gcc-12 -y sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 12 From 96597152bcd97abfe810ad506c032c6930846d81 Mon Sep 17 00:00:00 2001 From: jspijker Date: Mon, 7 Nov 2022 09:18:28 +0100 Subject: [PATCH 15/17] Use GCC10 as default for Ubuntu-20.04 --- .github/workflows/conan-package-create.yml | 6 ++++++ .github/workflows/cura-installer.yml | 10 ++++++++-- .github/workflows/unit-test.yml | 9 +++------ 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/.github/workflows/conan-package-create.yml b/.github/workflows/conan-package-create.yml index 4af608b7ac..d72f436154 100644 --- a/.github/workflows/conan-package-create.yml +++ b/.github/workflows/conan-package-create.yml @@ -115,6 +115,12 @@ jobs: sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 12 sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-12 12 + - name: Use GCC-10 on ubuntu-20.04 + if: ${{ startsWith(inputs.runs_on, 'ubuntu-20.04') }} + run: | + sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 10 + sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-10 10 + - name: Create the default Conan profile run: conan profile new default --detect diff --git a/.github/workflows/cura-installer.yml b/.github/workflows/cura-installer.yml index 99d12a5057..371847e81e 100644 --- a/.github/workflows/cura-installer.yml +++ b/.github/workflows/cura-installer.yml @@ -116,7 +116,7 @@ jobs: run: brew install autoconf automake ninja create-dmg - name: Install Linux system requirements - if: ${{ runner.os == 'Linux' }} + if: ${{ startsWith(inputs.runs_on, 'ubuntu-22.04') }} run: | sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y sudo apt update @@ -127,12 +127,18 @@ jobs: echo "APPIMAGETOOL_LOCATION=$GITHUB_WORKSPACE/appimagetool" >> $GITHUB_ENV - name: Install GCC-12 on ubuntu-22.04 - if: ${{ matrix.os == 'ubuntu-22.04' }} + if: ${{ startsWith(inputs.runs_on, 'ubuntu-22.04') }} run: | sudo apt install g++-12 gcc-12 -y sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 12 sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-12 12 + - name: Use GCC-10 on ubuntu-20.04 + if: ${{ startsWith(inputs.runs_on, 'ubuntu-20.04') }} + run: | + sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 10 + sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-10 10 + - name: Create the default Conan profile run: conan profile new default --detect diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index 035a2b8ef1..4f7d077432 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -107,17 +107,14 @@ jobs: - name: Install Linux system requirements if: ${{ runner.os == 'Linux' }} run: | - sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y sudo apt update sudo apt upgrade sudo apt install build-essential checkinstall libegl-dev zlib1g-dev libssl-dev ninja-build autoconf libx11-dev libx11-xcb-dev libfontenc-dev libice-dev libsm-dev libxau-dev libxaw7-dev libxcomposite-dev libxcursor-dev libxdamage-dev libxdmcp-dev libxext-dev libxfixes-dev libxi-dev libxinerama-dev libxkbfile-dev libxmu-dev libxmuu-dev libxpm-dev libxrandr-dev libxrender-dev libxres-dev libxss-dev libxt-dev libxtst-dev libxv-dev libxvmc-dev libxxf86vm-dev xtrans-dev libxcb-render0-dev libxcb-render-util0-dev libxcb-xkb-dev libxcb-icccm4-dev libxcb-image0-dev libxcb-keysyms1-dev libxcb-randr0-dev libxcb-shape0-dev libxcb-sync-dev libxcb-xfixes0-dev libxcb-xinerama0-dev xkb-data libxcb-dri3-dev uuid-dev libxcb-util-dev libxkbcommon-x11-dev pkg-config -y - - name: Install GCC-12 on ubuntu-22.04 - if: ${{ startsWith(inputs.runs_on, 'ubuntu-22.04') }} + - name: Use GCC-10 on ubuntu-20.04 run: | - sudo apt install g++-12 gcc-12 -y - sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 12 - sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-12 12 + sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 10 + sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-10 10 - name: Get Conan configuration run: conan config install https://github.com/Ultimaker/conan-config.git From 880028835973f3a8a6e3ad0e419c0667ebc135eb Mon Sep 17 00:00:00 2001 From: jspijker Date: Tue, 8 Nov 2022 11:27:07 +0100 Subject: [PATCH 16/17] Runs apt update on all Linux --- .github/workflows/cura-installer.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cura-installer.yml b/.github/workflows/cura-installer.yml index 371847e81e..6b70a7cc31 100644 --- a/.github/workflows/cura-installer.yml +++ b/.github/workflows/cura-installer.yml @@ -116,7 +116,7 @@ jobs: run: brew install autoconf automake ninja create-dmg - name: Install Linux system requirements - if: ${{ startsWith(inputs.runs_on, 'ubuntu-22.04') }} + if: ${{ runner.os == 'Linux' }} run: | sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y sudo apt update From efa302ef19a2decd5eca47bf47dfcc96e680952e Mon Sep 17 00:00:00 2001 From: jspijker Date: Tue, 8 Nov 2022 11:27:51 +0100 Subject: [PATCH 17/17] Removed and extra space --- .github/workflows/cura-installer.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cura-installer.yml b/.github/workflows/cura-installer.yml index 6b70a7cc31..d0f9fb895e 100644 --- a/.github/workflows/cura-installer.yml +++ b/.github/workflows/cura-installer.yml @@ -116,7 +116,7 @@ jobs: run: brew install autoconf automake ninja create-dmg - name: Install Linux system requirements - if: ${{ runner.os == 'Linux' }} + if: ${{ runner.os == 'Linux' }} run: | sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y sudo apt update