From 17514b2a6aac7d2eb9850afb563ca69ffc22e1fc Mon Sep 17 00:00:00 2001 From: Pascal <73157207+EGOiST1991@users.noreply.github.com> Date: Tue, 20 Oct 2020 11:36:11 +0200 Subject: [PATCH 01/27] Head was 1mm to high after the pause The wrong line starts here: 458: prepend_gcode += self.putValue(G = 1, Z = current_z + 1, F = 300) + "\n" The correct line: 458: prepend_gcode += self.putValue(G = 1, Z = current_z, F = 300) + "\n" --- plugins/PostProcessingPlugin/scripts/PauseAtHeight.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py b/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py index fc7bfec60a..82958ca11b 100644 --- a/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py +++ b/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py @@ -455,7 +455,7 @@ class PauseAtHeight(Script): prepend_gcode += self.putValue(G = 1, E = -retraction_amount, F = 6000) + "\n" #Move the head back - prepend_gcode += self.putValue(G = 1, Z = current_z + 1, F = 300) + "\n" + prepend_gcode += self.putValue(G = 1, Z = current_z, F = 300) + "\n" prepend_gcode += self.putValue(G = 1, X = x, Y = y, F = 9000) + "\n" if retraction_amount != 0: prepend_gcode += self.putValue(G = 1, E = retraction_amount, F = 6000) + "\n" From 547698cffcd55cf60f634832bdcba53919688316 Mon Sep 17 00:00:00 2001 From: Kostas Karmas Date: Fri, 12 Mar 2021 17:30:17 +0100 Subject: [PATCH 02/27] Change TableView row color and text color when the row is selected CURA-8066 --- resources/qml/TableView.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/qml/TableView.qml b/resources/qml/TableView.qml index dd80304b83..1b084be5a0 100644 --- a/resources/qml/TableView.qml +++ b/resources/qml/TableView.qml @@ -18,7 +18,7 @@ OldControls.TableView Label { id: tableCellLabel - color: UM.Theme.getColor("text") + color: styleData.selected ? UM.Theme.getColor("primary_button_text") : UM.Theme.getColor("text") elide: Text.ElideRight text: styleData.value anchors.fill: parent @@ -29,7 +29,7 @@ OldControls.TableView rowDelegate: Rectangle { - color: styleData.selected ? UM.Theme.getColor("secondary") : UM.Theme.getColor("main_background") + color: styleData.selected ? UM.Theme.getColor("primary_button") : UM.Theme.getColor("main_background") height: UM.Theme.getSize("table_row").height } From ccf18a7443148fadf23111bd2deb595194b929e7 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Tue, 23 Mar 2021 11:18:25 +0100 Subject: [PATCH 03/27] Updated Welcome screen first run CURA-8094 Cura onboarding flow --- resources/qml/WelcomePages/WelcomeContent.qml | 30 +++++++++---------- .../images/first_run_welcome_cura.svg | 26 +++++++++------- resources/themes/cura-light/theme.json | 7 ++++- 3 files changed, 37 insertions(+), 26 deletions(-) diff --git a/resources/qml/WelcomePages/WelcomeContent.qml b/resources/qml/WelcomePages/WelcomeContent.qml index 1464e363a8..6d429677a4 100644 --- a/resources/qml/WelcomePages/WelcomeContent.qml +++ b/resources/qml/WelcomePages/WelcomeContent.qml @@ -7,7 +7,6 @@ import QtQuick.Controls 2.3 import UM 1.3 as UM import Cura 1.1 as Cura - // // This component contains the content for the "Welcome" page of the welcome on-boarding process. // @@ -15,11 +14,20 @@ Item { UM.I18nCatalog { id: catalog; name: "cura" } - Column // Arrange the items vertically and put everything in the center + // Arrange the items vertically and put everything in the center + Column { - anchors.centerIn: parent - width: parent.width - spacing: 2 * UM.Theme.getSize("wide_margin").height + anchors.horizontalCenter: parent.horizontalCenter + anchors.verticalCenter: parent.verticalCenter + spacing: UM.Theme.getSize("thick_margin").height + + Image + { + id: curaImage + anchors.horizontalCenter: parent.horizontalCenter + source: UM.Theme.getImage("first_run_welcome_cura") + scale: 0.666 + } Label { @@ -28,23 +36,16 @@ Item horizontalAlignment: Text.AlignHCenter text: catalog.i18nc("@label", "Welcome to Ultimaker Cura") color: UM.Theme.getColor("primary_button") - font: UM.Theme.getFont("huge") + font: UM.Theme.getFont("huge_bold") renderType: Text.NativeRendering } - Image - { - id: curaImage - anchors.horizontalCenter: parent.horizontalCenter - source: UM.Theme.getImage("first_run_welcome_cura") - } - Label { id: textLabel anchors.horizontalCenter: parent.horizontalCenter horizontalAlignment: Text.AlignHCenter - text: catalog.i18nc("@text", "Please follow these steps to set up\nUltimaker Cura. This will only take a few moments.") + text: catalog.i18nc("@text", "Please follow these steps to set up Ultimaker Cura.\nThis will only take a few moments.") font: UM.Theme.getFont("medium") color: UM.Theme.getColor("text") renderType: Text.NativeRendering @@ -54,7 +55,6 @@ Item { id: getStartedButton anchors.horizontalCenter: parent.horizontalCenter - anchors.margins: UM.Theme.getSize("wide_margin").width text: catalog.i18nc("@button", "Get started") onClicked: base.showNextPage() } diff --git a/resources/themes/cura-light/images/first_run_welcome_cura.svg b/resources/themes/cura-light/images/first_run_welcome_cura.svg index fddb073c82..9201843cdb 100644 --- a/resources/themes/cura-light/images/first_run_welcome_cura.svg +++ b/resources/themes/cura-light/images/first_run_welcome_cura.svg @@ -1,11 +1,17 @@ - - - - cura - Created with Sketch. - - - - + + + + + + + + + + + + + + + - \ No newline at end of file + diff --git a/resources/themes/cura-light/theme.json b/resources/themes/cura-light/theme.json index 5a99b023eb..5c51ac370b 100644 --- a/resources/themes/cura-light/theme.json +++ b/resources/themes/cura-light/theme.json @@ -34,6 +34,11 @@ "weight": 50, "family": "Noto Sans" }, + "huge_bold": { + "size": 1.8, + "weight": 63, + "family": "Noto Sans" + }, "medium": { "size": 1.16, "weight": 40, @@ -576,7 +581,7 @@ "monitor_preheat_temperature_control": [4.5, 2.0], - "welcome_wizard_window": [46.0, 45], + "welcome_wizard_window": [43, 43], "modal_window_minimum": [60.0, 45], "license_window_minimum": [45, 45], "wizard_progress": [10.0, 0.0], From c727fe5e0ce0c2294d4f6e0d00a7cbbee84b1cf2 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Tue, 23 Mar 2021 11:20:38 +0100 Subject: [PATCH 04/27] Updated Sign in screen first run CURA-8094 Cura onboarding flow --- resources/qml/WelcomePages/CloudContent.qml | 141 ++++++++++++------ .../images/first_run_ultimaker_cloud.svg | 29 ++-- resources/themes/cura-light/theme.json | 5 + 3 files changed, 119 insertions(+), 56 deletions(-) diff --git a/resources/qml/WelcomePages/CloudContent.qml b/resources/qml/WelcomePages/CloudContent.qml index 48410f7f12..1fd96a74b4 100644 --- a/resources/qml/WelcomePages/CloudContent.qml +++ b/resources/qml/WelcomePages/CloudContent.qml @@ -40,7 +40,7 @@ Item anchors.top: parent.top anchors.horizontalCenter: parent.horizontalCenter horizontalAlignment: Text.AlignHCenter - text: catalog.i18nc("@label", "Ultimaker Account") + text: catalog.i18nc("@label", "Sign in to the Ultimaker platform") color: UM.Theme.getColor("primary_button") font: UM.Theme.getFont("huge") renderType: Text.NativeRendering @@ -63,64 +63,105 @@ Item // the cloud contents area. Column { - anchors.centerIn: parent + anchors.horizontalCenter: parent.horizontalCenter width: parent.width height: childrenRect.height spacing: 20 * screenScaleFactor - Image // Cloud image + // Cloud image + Image { id: cloudImage anchors.horizontalCenter: parent.horizontalCenter source: UM.Theme.getImage("first_run_ultimaker_cloud") + scale: 0.666 } - Label // A title-ish text + // Motivational icons + Row { - id: highlightTextLabel - anchors.horizontalCenter: parent.horizontalCenter - horizontalAlignment: Text.AlignHCenter - text: catalog.i18nc("@text", "Your key to connected 3D printing") - textFormat: Text.RichText - color: UM.Theme.getColor("primary") - font: UM.Theme.getFont("medium") - renderType: Text.NativeRendering - } + id: motivationRow + width: parent.width - Label // A number of text items - { - id: textLabel - anchors.horizontalCenter: parent.horizontalCenter - text: + Column { - // There are 3 text items, each of which is translated separately as a single piece of text. - var full_text = "" - var t = "" + id: marketplaceColumn + width: Math.round(parent.width / 3) + spacing: UM.Theme.getSize("default_margin").height - t = catalog.i18nc("@text", "- Customize your experience with more print profiles and plugins") - full_text += "

" + t + "

" - - t = catalog.i18nc("@text", "- Stay flexible by syncing your setup and loading it anywhere") - full_text += "

" + t + "

" - - t = catalog.i18nc("@text", "- Increase efficiency with a remote workflow on Ultimaker printers") - full_text += "

" + t + "

" - - return full_text + Image + { + id: marketplaceImage + anchors.horizontalCenter: parent.horizontalCenter + source: UM.Theme.getIcon("plugin_48px") + } + Label + { + id: marketplaceTextLabel + anchors.horizontalCenter: parent.horizontalCenter + text: catalog.i18nc("@text", "Add material settings and\nplugins from the Marketplace") + horizontalAlignment: Text.AlignHCenter + color: UM.Theme.getColor("text") + font: UM.Theme.getFont("tiny") + renderType: Text.NativeRendering + } + } + + Column + { + id: syncColumn + width: Math.round(parent.width / 3) + spacing: UM.Theme.getSize("default_margin").height + + Image + { + id: syncImage + anchors.horizontalCenter: parent.horizontalCenter + source: UM.Theme.getIcon("spool_48px") + } + Label + { + id: syncTextLabel + anchors.horizontalCenter: parent.horizontalCenter + text: catalog.i18nc("@text", "Backup and sync your\nmaterial settings and plugins") + horizontalAlignment: Text.AlignHCenter + color: UM.Theme.getColor("text") + font: UM.Theme.getFont("tiny") + renderType: Text.NativeRendering + } + } + + Column + { + id: communityColumn + width: Math.round(parent.width / 3) + spacing: UM.Theme.getSize("default_margin").height + + Image + { + id: communityImage + anchors.horizontalCenter: communityColumn.horizontalCenter + source: UM.Theme.getIcon("group_48px") + } + Label + { + id: communityTextLabel + anchors.horizontalCenter: communityColumn.horizontalCenter + text: catalog.i18nc("@text", "Share ideas and get help\nfrom 48,000+ users in the\nUltimaker Community") + horizontalAlignment: Text.AlignHCenter + color: UM.Theme.getColor("text") + font: UM.Theme.getFont("tiny") + renderType: Text.NativeRendering + } } - textFormat: Text.RichText - font: UM.Theme.getFont("medium") - color: UM.Theme.getColor("text") - renderType: Text.NativeRendering } - // "Sign in" and "Create an account" exist inside the column + // Sign in Button Cura.PrimaryButton { id: signInButton - height: createAccountButton.height - width: createAccountButton.width + anchors.margins: UM.Theme.getSize("default_margin").width anchors.horizontalCenter: parent.horizontalCenter text: catalog.i18nc("@button", "Sign in") onClicked: Cura.API.account.login() @@ -135,16 +176,28 @@ Item } } - Cura.SecondaryButton + // Create an account link + Label { - id: createAccountButton + id: createAccountLabel + width: parent.width anchors.horizontalCenter: parent.horizontalCenter - text: catalog.i18nc("@button","Create account") - onClicked: Qt.openUrlExternally(CuraApplication.ultimakerCloudAccountRootUrl + "/app/create") + horizontalAlignment: Text.AlignHCenter + text: + { + var t1 = catalog.i18nc("@text", "Create a free Ultimaker acount") + var t = "" + t1 + "" + return t + } + textFormat: Text.RichText + wrapMode: Text.WordWrap + font: UM.Theme.getFont("medium") + color: UM.Theme.getColor("text") + linkColor: UM.Theme.getColor("text_link") + onLinkActivated: Qt.openUrlExternally(CuraApplication.ultimakerCloudAccountRootUrl + "/app/create") + renderType: Text.NativeRendering } } - - } // The "Skip" button exists on the bottom right diff --git a/resources/themes/cura-light/images/first_run_ultimaker_cloud.svg b/resources/themes/cura-light/images/first_run_ultimaker_cloud.svg index 1e9b313862..5d6e8df92a 100644 --- a/resources/themes/cura-light/images/first_run_ultimaker_cloud.svg +++ b/resources/themes/cura-light/images/first_run_ultimaker_cloud.svg @@ -1,12 +1,17 @@ - - - - Group-cloud - Created with Sketch. - - - - - - - \ No newline at end of file + + + + + + + + + + + + + + + + + diff --git a/resources/themes/cura-light/theme.json b/resources/themes/cura-light/theme.json index 5c51ac370b..33f96ccb5c 100644 --- a/resources/themes/cura-light/theme.json +++ b/resources/themes/cura-light/theme.json @@ -128,6 +128,11 @@ "italic": true, "family": "Noto Sans" }, + "tiny": { + "size": 0.85, + "weight": 40, + "family": "Noto Sans" + }, "small": { "size": 0.7, "weight": 40, From 91c71e1c8aaf1f8ec62e4bc94c701d34b74e5ad9 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Tue, 23 Mar 2021 11:22:20 +0100 Subject: [PATCH 05/27] Added missing 48px icons These are the new icons. Specifically for 48px. CURA-8094 Cura onboarding flow --- resources/themes/cura-light/icons/group_48px.svg | 12 ++++++++++++ resources/themes/cura-light/icons/plugin_48px.svg | 7 +++++++ resources/themes/cura-light/icons/spool_48px.svg | 8 ++++++++ 3 files changed, 27 insertions(+) create mode 100755 resources/themes/cura-light/icons/group_48px.svg create mode 100755 resources/themes/cura-light/icons/plugin_48px.svg create mode 100755 resources/themes/cura-light/icons/spool_48px.svg diff --git a/resources/themes/cura-light/icons/group_48px.svg b/resources/themes/cura-light/icons/group_48px.svg new file mode 100755 index 0000000000..0debb0f300 --- /dev/null +++ b/resources/themes/cura-light/icons/group_48px.svg @@ -0,0 +1,12 @@ + + + + + diff --git a/resources/themes/cura-light/icons/plugin_48px.svg b/resources/themes/cura-light/icons/plugin_48px.svg new file mode 100755 index 0000000000..4f74a43c42 --- /dev/null +++ b/resources/themes/cura-light/icons/plugin_48px.svg @@ -0,0 +1,7 @@ + + + + + diff --git a/resources/themes/cura-light/icons/spool_48px.svg b/resources/themes/cura-light/icons/spool_48px.svg new file mode 100755 index 0000000000..66cc02a57b --- /dev/null +++ b/resources/themes/cura-light/icons/spool_48px.svg @@ -0,0 +1,8 @@ + + + + + From 778db451ad11d1e61a353e22c3307ebc3682ce89 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Tue, 23 Mar 2021 11:40:23 +0100 Subject: [PATCH 06/27] fixed typo CURA-8094 Cura onboarding flow --- resources/qml/WelcomePages/CloudContent.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/qml/WelcomePages/CloudContent.qml b/resources/qml/WelcomePages/CloudContent.qml index 1fd96a74b4..fbdb06f987 100644 --- a/resources/qml/WelcomePages/CloudContent.qml +++ b/resources/qml/WelcomePages/CloudContent.qml @@ -185,7 +185,7 @@ Item horizontalAlignment: Text.AlignHCenter text: { - var t1 = catalog.i18nc("@text", "Create a free Ultimaker acount") + var t1 = catalog.i18nc("@text", "Create a free Ultimaker Account") var t = "" + t1 + "" return t } From 1b8d261e959988ccd8d06c23f01f7f8834931861 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Tue, 23 Mar 2021 12:57:38 +0100 Subject: [PATCH 07/27] Correct spacing in Welcome screen CURA-8094 Cura onboarding flow --- resources/qml/WelcomePages/WelcomeContent.qml | 50 +++++++++++++------ 1 file changed, 35 insertions(+), 15 deletions(-) diff --git a/resources/qml/WelcomePages/WelcomeContent.qml b/resources/qml/WelcomePages/WelcomeContent.qml index 6d429677a4..6e05cad010 100644 --- a/resources/qml/WelcomePages/WelcomeContent.qml +++ b/resources/qml/WelcomePages/WelcomeContent.qml @@ -29,26 +29,39 @@ Item scale: 0.666 } - Label + Column { - 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("huge_bold") - renderType: Text.NativeRendering + spacing: UM.Theme.getSize("thick_margin").height + + 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("huge_bold") + renderType: Text.NativeRendering + } + + Label + { + id: textLabel + anchors.horizontalCenter: parent.horizontalCenter + horizontalAlignment: Text.AlignHCenter + text: catalog.i18nc("@text", "Please follow these steps to set up Ultimaker Cura.\nThis will only take a few moments.") + font: UM.Theme.getFont("medium") + color: UM.Theme.getColor("text") + renderType: Text.NativeRendering + } } - Label + // Filler item + Item { - id: textLabel - anchors.horizontalCenter: parent.horizontalCenter - horizontalAlignment: Text.AlignHCenter - text: catalog.i18nc("@text", "Please follow these steps to set up Ultimaker Cura.\nThis will only take a few moments.") - font: UM.Theme.getFont("medium") - color: UM.Theme.getColor("text") - renderType: Text.NativeRendering + height: UM.Theme.getSize("thick_margin").height + width: parent.width } Cura.PrimaryButton @@ -58,5 +71,12 @@ Item text: catalog.i18nc("@button", "Get started") onClicked: base.showNextPage() } + + // Filler item + Item + { + height: UM.Theme.getSize("thick_margin").height + width: parent.width + } } } From 5083db8d44cfbce7d20649ce32a15477202336e0 Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Wed, 24 Mar 2021 12:00:05 +0100 Subject: [PATCH 08/27] On new install or update, have highlights not just changelog. Place images in resources/images/whats_new/N.format and texts in resources/texts/whats_new/N.format where N is the ordinal and format the respective allowed formats. CURA-8014 --- cura/UI/WhatsNewPagesModel.py | 79 +++++++- resources/images/whats_new/0.png | Bin 0 -> 1935 bytes resources/images/whats_new/1.png | Bin 0 -> 2072 bytes resources/images/whats_new/2.png | Bin 0 -> 1958 bytes .../qml/WelcomePages/ChangelogContent.qml | 59 ++++++ .../qml/WelcomePages/WhatsNewContent.qml | 179 +++++++++++++++--- resources/qml/Widgets/ScrollableTextArea.qml | 7 +- resources/texts/whats_new/0.html | 5 + resources/texts/whats_new/1.html | 2 + resources/texts/whats_new/2.html | 2 + 10 files changed, 307 insertions(+), 26 deletions(-) create mode 100644 resources/images/whats_new/0.png create mode 100644 resources/images/whats_new/1.png create mode 100644 resources/images/whats_new/2.png create mode 100644 resources/qml/WelcomePages/ChangelogContent.qml create mode 100644 resources/texts/whats_new/0.html create mode 100644 resources/texts/whats_new/1.html create mode 100644 resources/texts/whats_new/2.html diff --git a/cura/UI/WhatsNewPagesModel.py b/cura/UI/WhatsNewPagesModel.py index 5b968ae574..afba295e90 100644 --- a/cura/UI/WhatsNewPagesModel.py +++ b/cura/UI/WhatsNewPagesModel.py @@ -1,8 +1,12 @@ -# Copyright (c) 2019 Ultimaker B.V. +# Copyright (c) 2021 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. - from .WelcomePagesModel import WelcomePagesModel +import os +from typing import Optional, Dict, List, Tuple +from PyQt5.QtCore import pyqtProperty, pyqtSlot +from UM.Logger import Logger +from UM.Resources import Resources # # This Qt ListModel is more or less the same the WelcomePagesModel, except that this model is only for showing the @@ -10,13 +14,84 @@ from .WelcomePagesModel import WelcomePagesModel # class WhatsNewPagesModel(WelcomePagesModel): + image_formats = [".png", ".jpg", ".jpeg", ".gif", ".svg"] + text_formats = [".txt", ".htm", ".html"] + image_key = "image" + text_key = "text" + + @classmethod + def _collectOrdinalFiles(cls, resource_type: int, include: List[str]) -> Tuple[Dict[int, str], int]: + result = {} # Dict[int, str] + highest = -1 + try: + folder_path = Resources.getPath(resource_type, "whats_new") + for _, _, files in os.walk(folder_path): + for filename in files: + basename = os.path.basename(filename) + base, ext = os.path.splitext(basename) + if ext not in include or not base.isdigit(): + continue + page_no = int(base) + highest = max(highest, page_no) + result[page_no] = os.path.join(folder_path, filename) + except FileNotFoundError: + Logger.logException("w", "Could not find 'whats_new' folder for resource-type {0}".format(resource_type)) + return result, highest + + @classmethod + def _loadText(cls, filename: str) -> str: + result = "" + try: + with open(filename, "r", encoding="utf-8") as file: + result = file.read() + except OSError: + Logger.logException("w", "Could not open {0}".format(filename)) + return result + def initialize(self) -> None: self._pages = [] self._pages.append({"id": "whats_new", "page_url": self._getBuiltinWelcomePagePath("WhatsNewContent.qml"), + "next_page_button_text": self._catalog.i18nc("@action:button", "Skip"), + "next_page_id": "changelog" + }) + self._pages.append({"id": "changelog", + "page_url": self._getBuiltinWelcomePagePath("ChangelogContent.qml"), "next_page_button_text": self._catalog.i18nc("@action:button", "Close"), }) self.setItems(self._pages) + images, max_image = WhatsNewPagesModel._collectOrdinalFiles(Resources.Images, WhatsNewPagesModel.image_formats) + texts, max_text = WhatsNewPagesModel._collectOrdinalFiles(Resources.Texts, WhatsNewPagesModel.text_formats) + highest = max(max_image, max_text) + + self._subpages = [] # List[Dict[str, str]] + for n in range(0, highest + 1): + self._subpages.append({ + WhatsNewPagesModel.image_key: None if n not in images else images[n], + WhatsNewPagesModel.text_key: None if n not in texts else self._loadText(texts[n]) + }) + if len(self._subpages) == 0: + self._subpages.append({WhatsNewPagesModel.text_key: "~ There Is Nothing New Under The Sun ~"}) + + def _getSubpageItem(self, page: int, item: str) -> Optional[str]: + if 0 <= page < self.subpageCount and item in self._subpages[page]: + return self._subpages[page][item] + else: + return None + + @pyqtProperty(int, constant = True) + def subpageCount(self) -> int: + return len(self._subpages) + + @pyqtSlot(int, result = str) + def getSubpageImageSource(self, page: int) -> str: + result = self._getSubpageItem(page, WhatsNewPagesModel.image_key) + return "file:///" + (result if result else Resources.getPath(Resources.Images, "cura-icon.png")) + + @pyqtSlot(int, result = str) + def getSubpageText(self, page: int) -> str: + result = self._getSubpageItem(page, WhatsNewPagesModel.text_key) + return result if result else "* * *" __all__ = ["WhatsNewPagesModel"] diff --git a/resources/images/whats_new/0.png b/resources/images/whats_new/0.png new file mode 100644 index 0000000000000000000000000000000000000000..b2b56a3bf20f0e85422a6ce2729cbb80b276cead GIT binary patch literal 1935 zcmb`Ic~sKr8pnZtD!Fj6F>}d{oUGJzBF%;rWlTj&&1o@H6xVbl8FynuBB8X*lNqTY zR%T|o;4W^F3Cd){;2=llIUX`b%R zYRWpwAP`6m>*DAI0)g%2`x+=jK1a|4o#YER#>*K4D(~JsEf0V&hm#HAgKEL8|4bH$ zGf|;{p{hsSQfRD#={J&`xD-o>V(Pc<|1U>DQO5X$FXL8)3oR*|<2MZh1>-J2X>eYk zbD?-%o&9XNQSW*V@6}vt;N`KE+@N#KGS3tAoi;WP+j-R8(6fSG8fTfd_O#cT>i|V( z%^TpY)!AV__=~o~W`+R;jzJG5iEy^TJ=0vG;!I{rD4eZ?L`uU4QIPnV=&`&KESi*p zFb6(&t9r!htk5WWxoi8~c{n&*MLT!&@MnE+@xh<_^5}Yd1hFAROds0~U_Rozhv>x9 zDScTB*b}@cSR$C^Z1Rb>7J9mVcUZc(qIWhEwi19kkwf^C}lCb9SwXGkHRGZ~P znapgs8ssB4>N9b*Dz#rscOu2ZC3dH z*LN55qEv5NoKwC_qSc~~E~$wdx|UxJ`h35WJWHr8MEf89S5V`|DRNx$U-j2$3NfEF z)I8|AO+7i6l2`i*X8`F+ENu0DrgfgQ?kIg9gq2=DRj((BWJ>f-COmw1bLE-A^NJ=> z?@reC3yxgsWvP3^Jgj#R9W!AWX(Z@O^1(Jr$M4{fb%g`--6h&hFA(#JuzIbVSk)n?nA;`)B0V1n6;gS&!;x?U))(g&Qq2A^4Xsa?J^25db^<2 z71ioHlal)Z@U>{m(Ff1kWMnnRpDE9VMbuBUa?X&3HfJ*K!C0EFMXS!?GRg9`W4^~d zGASmL;`KGZU?*Ogo!>Kpre?Zm9?hYlihRmyB4F20=?&@q818|_vYybxr;BQ=gg>5T{C8!u7VxFv@GYNAYOf|0DE`|?|I8Ou z($-o-{_9;tR3JR`$U>=E?y6=kG<8xSr)d<>-Hgz0i}o+TGd!rYQ`zy zs#BK*Ipya>AcJz|qvoZ&x0V?jp~>(3@|&c)DoKS?}Sy(v>WOQ~O7C>F zKg0h5)Z6pd*3gQ{=%Quo_#k|0I;B`h_wpf@Zl3sMCN6UeL!BpEkp{OswVy*}mu(`cg^8_QtVy3&73 zR(5OAw*UVy|397PAO6s7ZrKOgUi$5Kszjo{6dGixysNiDwd73{ggx%=SdIyx{tejG BaJ2vc literal 0 HcmV?d00001 diff --git a/resources/images/whats_new/1.png b/resources/images/whats_new/1.png new file mode 100644 index 0000000000000000000000000000000000000000..8d61045b400dc613f8827c80f06eb0bb1ca05d6a GIT binary patch literal 2072 zcmeAS@N?(olHy`uVBq!ia0y~yU~~Yow{S24$*i^{Hz37W9OUlAuiND@NRoc?EIvFmEX-xz*FJSik>%O;V4k zETi$Y3YIewj|B~qd)*K8n93mweE;0=pE01vb(V6%0`_hb_X7_6VwrsnjdD7dWEh!k zBbHb)u~lvGC}!dLk}&ZZhs2A6N@oQPE;J962J>(C8Gp@pkOw)^I30v)_VhBc(^pH9qKptB1UwU(*;?cC7^bo>LM5YNhA z#f7XOKZ^%Tu6^NuJO*Uw`Xvfdm-r93fY}TAW?k+-C<0>ZFZdkaR3~&U9cXBUR_x!R zFP{t4K$<_lxFNn&zVk9DsOGt(?=$%uGUqVRwhug3AFLP1_XvX|?B@FY&U=xbYy#5p z{8He3$-fmmsX(KCxL7^ky~Mwv5ES0?UE6K$f4;u_zR&-ql3x@JIzSE$e$k>{U03=4 z-26-5KP>wHN#vJ|#KHMSZU-K}tXTf**T;wP)ko&%=N&NrrD1UfB;NcoN4=`*&!2DY z;(wklW3O54-<O4|MUF*S_hzqYHl0?d8qw`oceFY2iy7M z?d+ca?{Ap?6r}%eNzdn6;Sc67m&pMwRDN_7+*}0v|SkO_-dwVU8cr#Oz0+V1E0$^-4@} z(?DMMe&K7V%YoBiC(G^H*Tqp0`EQCL(>>?w;enfh!Q}f<9nAMB4;Nw7KMivG?3eGl zlpdsl1J(F$Y#`K8`O9`|cR?*bTT<>S2(^6XyLB2+%gis|6?KJLmbPp6BA8`phQAX3 z(7R8k4rS3yu>{;~TT&%z${isuvi<=mE^JF`MPXjR5ng^)2Z~@` z@MMqhTi);D&1Yp)of_l$YsR`(Zbb(RNQ z_`Vs5GGAMM&=6#?oPTuK1cy{ z22lWc9p5MO*JjR1kWs89U%fB*ANmO@TH>9b-=9;*vkX*}*Ql0Wm|Vx41}ZCS46k13 z`d4xWR2J=EnHo6nUrY?Bh%ZoFwFF*P7KQjo{@Pq%3bL(KbHVEu?;UtSW#Z~!AK{ns zJxL%7$`>8-TTsuywHavWovEj+9sWCK90IvwmPd&#Nb#VpQt;Mtzbg;)Y!p*YI40HK sAen8$l(yz0$Bd1~kOkh}tNA5=`M}W{HycwsU~SIe>FVdQ&MBb@0QfJZxc~qF literal 0 HcmV?d00001 diff --git a/resources/images/whats_new/2.png b/resources/images/whats_new/2.png new file mode 100644 index 0000000000000000000000000000000000000000..3220bd29a9537fcc98f093a73d37e698f59ce100 GIT binary patch literal 1958 zcmbuAS5(sp7RK`r5du;YX#paG1VzUK0ucxjM2ZBE5Eq1i0tui7loA$&7%8C_Dat6l z=rDkLXhB8-(n4Pq3`HO#LklC366syY;_jY(n6q#5aLae^J@@hZC0(`0Nl7S6fIuKA z8*57k5D2(**#8OzALcvpURH+%2zJ1kgQ`9t=MDvgVum*Zfojr^e)BwXsKu$)uE8LX zbjSAqdIDeG1cAhiZ7j{M(L4m>HGz&eP|r&L8C8>LpVOI5Pb1YFUPkM=EX!OoSGSgg zi=ZvUp(m^ndT2G#tHze^iXH>v@n)8f~ zcK@E$NSS>VIxM**G?Nhs?7+@>)8;%YKgV{!HK``It+6D{F))6~3pp(r>rL$Avo$5}ylVoL-KDrA~?-DTJ~d9n#bfM|DC zvXYV~0}8y;2@Ik3;}_&!!or(~qItV!s4EDY1@W>y~Ti#D^Ur z)xud$TU*(SowtgneWa$VH#}Yn>oKk5h(8pwbQ`*k>`z0gL%9?4O>`5kq0FQ6cPfXw zrGzJkm=YU4!Ju7zFk>jtLi~Ed= zhV*3!{>;5s!E5$qi zS+uGj*r}>L_=LQ`60S1+rC&rbjzcjlNtWg?DO81t!z@b$*nhd!(3*Ip6& zDzgc3o0Hr7HxU6fvgH+zYi&a*OSA8Jk-4+BGi~F$ti}rZzM!mt-?cv)(7L^|`(TYN zR!8ZJFL0TU7Z`SJ)Tw&VSHhc7{DsjX_fIam>GlSgsWpw`5I5WYpDyHWtl7>?@S2PY z$q{n_#kbN3_xd+z%GmZCrUj&;m{>p7&=SN7kS1IsY3Ign31=a;q5wyG*=|rPA3>bI zGV7CDLXtpjrP*-h!I>+Bflh9d&NN>7msEz6WMfh9fQ`1cozY&Z^iND#2)1~;ntboZWhUY1 zCKQ7b2-=N(hqDy>;2JQh0UcK@vD76SvY)aF#V9Ha1qwFrk8r%87#Rar``wROG@+{$ zz-P}p(<+B+JzHMGq~X-vH^vIA_B;8FZDYh}DCT~1agV}QoA<8#Wwx(Mfa&Y)V+y4t zS4h5IdDohoU^CFkzSXb$#~8-YEf%fthS9=?cK>oR!|_nny?IhXay#ZG3Y5JKSiz3c zx#Wds=fU<*1iXfz^sTB+IF)`=fpa>Y;n=}5It$5HP~ha8n0mTyIO>As$1#QmCgvA& zJA7TRWw8u`)*wgAUmJl;@>}UmV4s9jm3Q;flg}Y;uH>tN?SV&pKREN^`z~}AvLul~ zfe+>6edaaruB1(g19xlPu!e#9>P>$nhBDuw$hSrw@x@-W_`{;$%PH#FCN9_*#x0w3 zg*X>eV>5QH3w8zpaH`%ISw^h%t}jRc3x6YFJ5GSLOQLfuBfpPez}@Kr$~R8V=kle# zX<}i;4L7+oA*8W3=;1=l=k>;#>$i6+wX}9~n{y&4A(6$m(^|~g(h!MlcYgBl`i<)| zzb|pZ@KX?MZ4yu$8^SR2O;UVk^xZa@D!p29w4^XKG6nJ6ahXRm|L&(DNe^zTdniOg zxw@hYhBUJ#b@CSC6=~UF+luX>L&eeHV6tW=uC30+Dv@5`t?BIZo3z)wR6Jw<9rd(h zpfzOC-B~1;E`pkZ=_!qTR8a-QGQLffPT0bz7;%}P`AP{uOkep+QtHO~fz@?rJ@{=3 zZLksv5NBu;gR1)hGu2Kpcv*XwPWvJmxbyOEvkHq%2a*C+|=wJeWgp!GiFSvs~K zH_}_(k;|l`FZ~Z5e;EjWrqO>N=6&1v8Kj{j@+VgPXZz3Gygfy2bW)mHot New Feature (1/2) +

+ Lorem ipsum et cetera ad infinitum dolce et gabana carpe diem.
+ Link to EXAMPLE. +

diff --git a/resources/texts/whats_new/1.html b/resources/texts/whats_new/1.html new file mode 100644 index 0000000000..2229c9d0d3 --- /dev/null +++ b/resources/texts/whats_new/1.html @@ -0,0 +1,2 @@ +

Hot New Feature (2/2)

+

Pa's wijze lynx bezag vroom het fikse aquaduct.

diff --git a/resources/texts/whats_new/2.html b/resources/texts/whats_new/2.html new file mode 100644 index 0000000000..1260befcb5 --- /dev/null +++ b/resources/texts/whats_new/2.html @@ -0,0 +1,2 @@ +

The other thing we wanted to tell you!

+

The quick brown fox jumps over the lazy dog.

From b04bbfdee2160aa125825d0a8096c435b783403c Mon Sep 17 00:00:00 2001 From: Remco Burema <41987080+rburema@users.noreply.github.com> Date: Wed, 24 Mar 2021 15:57:41 +0100 Subject: [PATCH 09/27] Adopt code-review remark. Co-authored-by: Jaime van Kessel --- resources/qml/WelcomePages/ChangelogContent.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/qml/WelcomePages/ChangelogContent.qml b/resources/qml/WelcomePages/ChangelogContent.qml index 89b9e746e8..d3eebe72e4 100644 --- a/resources/qml/WelcomePages/ChangelogContent.qml +++ b/resources/qml/WelcomePages/ChangelogContent.qml @@ -1,4 +1,4 @@ -// Copyright (c) 2019 Ultimaker B.V. +// Copyright (c) 2021 Ultimaker B.V. // Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.10 From d033e066f788bfafcbb7ebc3e901dedf080676cc Mon Sep 17 00:00:00 2001 From: Remco Burema <41987080+rburema@users.noreply.github.com> Date: Wed, 24 Mar 2021 15:58:44 +0100 Subject: [PATCH 10/27] Adopt code-review remark. Use width instead of implicit width. Co-authored-by: Jaime van Kessel --- resources/qml/WelcomePages/WhatsNewContent.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/qml/WelcomePages/WhatsNewContent.qml b/resources/qml/WelcomePages/WhatsNewContent.qml index ee08999b94..b60e952145 100644 --- a/resources/qml/WelcomePages/WhatsNewContent.qml +++ b/resources/qml/WelcomePages/WhatsNewContent.qml @@ -152,7 +152,7 @@ Item delegate: Rectangle { - implicitWidth: UM.Theme.getSize("thin_margin").width + width: UM.Theme.getSize("thin_margin").width implicitHeight: UM.Theme.getSize("thin_margin").height radius: width / 2 From 98ed2bc8b671724d4c0431ef523fdcc5fae31688 Mon Sep 17 00:00:00 2001 From: Remco Burema <41987080+rburema@users.noreply.github.com> Date: Wed, 24 Mar 2021 15:59:22 +0100 Subject: [PATCH 11/27] Adopt code-review remark. Use height instead of implicit height. Co-authored-by: Jaime van Kessel --- resources/qml/WelcomePages/WhatsNewContent.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/qml/WelcomePages/WhatsNewContent.qml b/resources/qml/WelcomePages/WhatsNewContent.qml index b60e952145..a50f08ab4f 100644 --- a/resources/qml/WelcomePages/WhatsNewContent.qml +++ b/resources/qml/WelcomePages/WhatsNewContent.qml @@ -153,7 +153,7 @@ Item Rectangle { width: UM.Theme.getSize("thin_margin").width - implicitHeight: UM.Theme.getSize("thin_margin").height + height: UM.Theme.getSize("thin_margin").height radius: width / 2 color: From f95c09db371c580f3522e93aa4af873ccb8b87d7 Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Wed, 24 Mar 2021 16:18:56 +0100 Subject: [PATCH 12/27] Type-checks, not just type comments, and static- over class-method. CURA-8014 --- cura/UI/WhatsNewPagesModel.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/cura/UI/WhatsNewPagesModel.py b/cura/UI/WhatsNewPagesModel.py index afba295e90..990f10afd3 100644 --- a/cura/UI/WhatsNewPagesModel.py +++ b/cura/UI/WhatsNewPagesModel.py @@ -19,9 +19,9 @@ class WhatsNewPagesModel(WelcomePagesModel): image_key = "image" text_key = "text" - @classmethod - def _collectOrdinalFiles(cls, resource_type: int, include: List[str]) -> Tuple[Dict[int, str], int]: - result = {} # Dict[int, str] + @staticmethod + def _collectOrdinalFiles(resource_type: int, include: List[str]) -> Tuple[Dict[int, str], int]: + result = {} #type: Dict[int, str] highest = -1 try: folder_path = Resources.getPath(resource_type, "whats_new") @@ -38,8 +38,8 @@ class WhatsNewPagesModel(WelcomePagesModel): Logger.logException("w", "Could not find 'whats_new' folder for resource-type {0}".format(resource_type)) return result, highest - @classmethod - def _loadText(cls, filename: str) -> str: + @staticmethod + def _loadText(filename: str) -> str: result = "" try: with open(filename, "r", encoding="utf-8") as file: @@ -65,7 +65,7 @@ class WhatsNewPagesModel(WelcomePagesModel): texts, max_text = WhatsNewPagesModel._collectOrdinalFiles(Resources.Texts, WhatsNewPagesModel.text_formats) highest = max(max_image, max_text) - self._subpages = [] # List[Dict[str, str]] + self._subpages = [] #type: List[Dict[str, str]] for n in range(0, highest + 1): self._subpages.append({ WhatsNewPagesModel.image_key: None if n not in images else images[n], From f1cbe1a9587dcbe88c8867e046c41ae8543fde48 Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Wed, 24 Mar 2021 16:29:38 +0100 Subject: [PATCH 13/27] ... and fix typing as a result of the last commit. CURA-8014 --- cura/UI/WhatsNewPagesModel.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cura/UI/WhatsNewPagesModel.py b/cura/UI/WhatsNewPagesModel.py index 990f10afd3..db0f4b3a74 100644 --- a/cura/UI/WhatsNewPagesModel.py +++ b/cura/UI/WhatsNewPagesModel.py @@ -65,7 +65,7 @@ class WhatsNewPagesModel(WelcomePagesModel): texts, max_text = WhatsNewPagesModel._collectOrdinalFiles(Resources.Texts, WhatsNewPagesModel.text_formats) highest = max(max_image, max_text) - self._subpages = [] #type: List[Dict[str, str]] + self._subpages = [] #type: List[Dict[str, Optional[str]]] for n in range(0, highest + 1): self._subpages.append({ WhatsNewPagesModel.image_key: None if n not in images else images[n], From 7304226aca377c2a109f9bf6e92b0d8793793c72 Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Wed, 24 Mar 2021 16:44:58 +0100 Subject: [PATCH 14/27] Increase reliance on anchors instead of width-height. CURA-8014 --- .../qml/WelcomePages/WhatsNewContent.qml | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/resources/qml/WelcomePages/WhatsNewContent.qml b/resources/qml/WelcomePages/WhatsNewContent.qml index a50f08ab4f..ca8c758620 100644 --- a/resources/qml/WelcomePages/WhatsNewContent.qml +++ b/resources/qml/WelcomePages/WhatsNewContent.qml @@ -45,12 +45,12 @@ Item { top: topSpacer.bottom bottom: whatsNewDots.top + left: parent.left + right: parent.right horizontalCenter: parent.horizontalCenter - margins: UM.Theme.getSize("default_margin").width + margins: UM.Theme.getSize("default_margin").width * 2 } - height: parent.height - (UM.Theme.getSize("default_margin").height * 2) - width: parent.width - (UM.Theme.getSize("default_margin").width * 2) color: UM.Theme.getColor("viewport_overlay") StackLayout @@ -60,11 +60,11 @@ Item anchors { top: parent.top + topMargin: UM.Theme.getSize("default_margin").width horizontalCenter: parent.horizontalCenter - margins: UM.Theme.getSize("default_margin").width / 2 } - height: parent.height - (UM.Theme.getSize("default_margin").height * 2) - width: parent.width - (UM.Theme.getSize("default_margin").width * 2) + height: parent.height + width: parent.width currentIndex: whatsNewDots.currentIndex @@ -72,9 +72,9 @@ Item { anchors { - horizontalCenter: parent.horizontalCenter top: parent.top - margins: UM.Theme.getSize("default_margin").width / 2 + topMargin: UM.Theme.getSize("default_margin").width / 2 + horizontalCenter: parent.horizontalCenter } model: manager.subpageCount @@ -83,9 +83,9 @@ Item { anchors { - horizontalCenter: parent.horizontalCenter top: parent.top - margins: UM.Theme.getSize("default_margin").width / 2 + topMargin: UM.Theme.getSize("default_margin").width / 2 + horizontalCenter: parent.horizontalCenter } color: UM.Theme.getColor("viewport_overlay") @@ -100,7 +100,7 @@ Item topMargin: UM.Theme.getSize("default_margin").width } width: parent.width - (UM.Theme.getSize("default_margin").width * 2) - height: (parent.height - (UM.Theme.getSize("default_margin").width * 2)) * 0.8 + height: (parent.height - UM.Theme.getSize("default_margin").height) * 0.75 fillMode: Image.PreserveAspectFit source: manager.getSubpageImageSource(index) From b21a21c0f29b4e2f257192a9da8a13587ea17c4d Mon Sep 17 00:00:00 2001 From: Kostas Karmas Date: Wed, 24 Mar 2021 16:47:40 +0100 Subject: [PATCH 15/27] Add missing style Without it the svgs are rendered as completely black. CURA-8094 --- .../themes/cura-light/images/first_run_ultimaker_cloud.svg | 2 +- resources/themes/cura-light/images/first_run_welcome_cura.svg | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/themes/cura-light/images/first_run_ultimaker_cloud.svg b/resources/themes/cura-light/images/first_run_ultimaker_cloud.svg index 5d6e8df92a..1476e7705d 100644 --- a/resources/themes/cura-light/images/first_run_ultimaker_cloud.svg +++ b/resources/themes/cura-light/images/first_run_ultimaker_cloud.svg @@ -1,6 +1,6 @@ - + diff --git a/resources/themes/cura-light/images/first_run_welcome_cura.svg b/resources/themes/cura-light/images/first_run_welcome_cura.svg index 9201843cdb..3d957884b4 100644 --- a/resources/themes/cura-light/images/first_run_welcome_cura.svg +++ b/resources/themes/cura-light/images/first_run_welcome_cura.svg @@ -1,6 +1,6 @@ - + From c38b6f05225998944eb9f6728bd1f0d5d64e1354 Mon Sep 17 00:00:00 2001 From: Kostas Karmas Date: Thu, 25 Mar 2021 08:56:15 +0100 Subject: [PATCH 16/27] Change SVG icon names CURA-8094 --- resources/themes/cura-light/icons/{group_48px.svg => group.svg} | 0 .../cura-light/icons/{spool_48px.svg => material_spool.svg} | 0 .../themes/cura-light/icons/{plugin_48px.svg => package.svg} | 0 3 files changed, 0 insertions(+), 0 deletions(-) rename resources/themes/cura-light/icons/{group_48px.svg => group.svg} (100%) mode change 100755 => 100644 rename resources/themes/cura-light/icons/{spool_48px.svg => material_spool.svg} (100%) mode change 100755 => 100644 rename resources/themes/cura-light/icons/{plugin_48px.svg => package.svg} (100%) mode change 100755 => 100644 diff --git a/resources/themes/cura-light/icons/group_48px.svg b/resources/themes/cura-light/icons/group.svg old mode 100755 new mode 100644 similarity index 100% rename from resources/themes/cura-light/icons/group_48px.svg rename to resources/themes/cura-light/icons/group.svg diff --git a/resources/themes/cura-light/icons/spool_48px.svg b/resources/themes/cura-light/icons/material_spool.svg old mode 100755 new mode 100644 similarity index 100% rename from resources/themes/cura-light/icons/spool_48px.svg rename to resources/themes/cura-light/icons/material_spool.svg diff --git a/resources/themes/cura-light/icons/plugin_48px.svg b/resources/themes/cura-light/icons/package.svg old mode 100755 new mode 100644 similarity index 100% rename from resources/themes/cura-light/icons/plugin_48px.svg rename to resources/themes/cura-light/icons/package.svg From 0488887780a940ff374d0bc146213ac43e1ec69d Mon Sep 17 00:00:00 2001 From: Kostas Karmas Date: Thu, 25 Mar 2021 08:57:15 +0100 Subject: [PATCH 17/27] Add image sizes for welcome dialog CURA-8094 --- resources/themes/cura-light/theme.json | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/resources/themes/cura-light/theme.json b/resources/themes/cura-light/theme.json index 33f96ccb5c..789161f9fc 100644 --- a/resources/themes/cura-light/theme.json +++ b/resources/themes/cura-light/theme.json @@ -128,11 +128,6 @@ "italic": true, "family": "Noto Sans" }, - "tiny": { - "size": 0.85, - "weight": 40, - "family": "Noto Sans" - }, "small": { "size": 0.7, "weight": 40, @@ -586,7 +581,7 @@ "monitor_preheat_temperature_control": [4.5, 2.0], - "welcome_wizard_window": [43, 43], + "welcome_wizard_window": [46, 45], "modal_window_minimum": [60.0, 45], "license_window_minimum": [45, 45], "wizard_progress": [10.0, 0.0], @@ -643,6 +638,9 @@ "monitor_progress_bar": [16.5, 1.0], "monitor_margin": [1.5, 1.5], - "table_row": [2.0, 2.0] + "table_row": [2.0, 2.0], + + "welcome_wizard_content_image_big": [18, 15], + "welcome_wizard_cloud_content_image": [4, 4] } } From d6c1ffdda375fec9d2f499c8bd9b2a9d0017e9ff Mon Sep 17 00:00:00 2001 From: Kostas Karmas Date: Thu, 25 Mar 2021 08:58:37 +0100 Subject: [PATCH 18/27] Fix review comments in CloudContent.qml CURA-8094 --- resources/qml/WelcomePages/CloudContent.qml | 108 ++++++++++++-------- 1 file changed, 64 insertions(+), 44 deletions(-) diff --git a/resources/qml/WelcomePages/CloudContent.qml b/resources/qml/WelcomePages/CloudContent.qml index fbdb06f987..692ad12a29 100644 --- a/resources/qml/WelcomePages/CloudContent.qml +++ b/resources/qml/WelcomePages/CloudContent.qml @@ -34,29 +34,16 @@ Item } } - Label - { - id: titleLabel - anchors.top: parent.top - anchors.horizontalCenter: parent.horizontalCenter - horizontalAlignment: Text.AlignHCenter - text: catalog.i18nc("@label", "Sign in to the Ultimaker platform") - color: UM.Theme.getColor("primary_button") - font: UM.Theme.getFont("huge") - renderType: Text.NativeRendering - } - // Area where the cloud contents can be put. Pictures, texts and such. Item { id: cloudContentsArea anchors { - top: titleLabel.bottom + top: parent.top bottom: skipButton.top left: parent.left right: parent.right - topMargin: UM.Theme.getSize("default_margin").height } // Pictures and texts are arranged using Columns with spacing. The whole picture and text area is centered in @@ -67,7 +54,25 @@ Item width: parent.width height: childrenRect.height - spacing: 20 * screenScaleFactor + spacing: UM.Theme.getSize("thick_margin").height + + Label + { + id: titleLabel + anchors.horizontalCenter: parent.horizontalCenter + horizontalAlignment: Text.AlignHCenter + text: catalog.i18nc("@label", "Sign in to the Ultimaker platform") + color: UM.Theme.getColor("primary_button") + font: UM.Theme.getFont("huge") + renderType: Text.NativeRendering + } + + // Filler item + Item + { + height: UM.Theme.getSize("default_margin").height + width: parent.width + } // Cloud image Image @@ -75,7 +80,18 @@ Item id: cloudImage anchors.horizontalCenter: parent.horizontalCenter source: UM.Theme.getImage("first_run_ultimaker_cloud") - scale: 0.666 + fillMode: Image.PreserveAspectFit + width: UM.Theme.getSize("welcome_wizard_content_image_big").width + sourceSize.width: width + sourceSize.height: height + } + + + // Filler item + Item + { + height: UM.Theme.getSize("default_margin").height + width: parent.width } // Motivational icons @@ -94,16 +110,22 @@ Item { id: marketplaceImage anchors.horizontalCenter: parent.horizontalCenter - source: UM.Theme.getIcon("plugin_48px") + fillMode: Image.PreserveAspectFit + width: UM.Theme.getSize("welcome_wizard_cloud_content_image").width + source: UM.Theme.getIcon("package") + sourceSize.width: width + sourceSize.height: height } Label { id: marketplaceTextLabel anchors.horizontalCenter: parent.horizontalCenter - text: catalog.i18nc("@text", "Add material settings and\nplugins from the Marketplace") + width: parent.width + text: catalog.i18nc("@text", "Add material settings and plugins from the Marketplace") + wrapMode: Text.Wrap horizontalAlignment: Text.AlignHCenter color: UM.Theme.getColor("text") - font: UM.Theme.getFont("tiny") + font: UM.Theme.getFont("default") renderType: Text.NativeRendering } } @@ -118,16 +140,22 @@ Item { id: syncImage anchors.horizontalCenter: parent.horizontalCenter - source: UM.Theme.getIcon("spool_48px") + fillMode: Image.PreserveAspectFit + width: UM.Theme.getSize("welcome_wizard_cloud_content_image").width + source: UM.Theme.getIcon("material_spool") + sourceSize.width: width + sourceSize.height: height } Label { id: syncTextLabel anchors.horizontalCenter: parent.horizontalCenter - text: catalog.i18nc("@text", "Backup and sync your\nmaterial settings and plugins") + width: parent.width + text: catalog.i18nc("@text", "Backup and sync your material settings and plugins") + wrapMode: Text.Wrap horizontalAlignment: Text.AlignHCenter color: UM.Theme.getColor("text") - font: UM.Theme.getFont("tiny") + font: UM.Theme.getFont("default") renderType: Text.NativeRendering } } @@ -142,16 +170,22 @@ Item { id: communityImage anchors.horizontalCenter: communityColumn.horizontalCenter - source: UM.Theme.getIcon("group_48px") + fillMode: Image.PreserveAspectFit + width: UM.Theme.getSize("welcome_wizard_cloud_content_image").width + source: UM.Theme.getIcon("group") + sourceSize.width: width + sourceSize.height: height } Label { id: communityTextLabel anchors.horizontalCenter: communityColumn.horizontalCenter - text: catalog.i18nc("@text", "Share ideas and get help\nfrom 48,000+ users in the\nUltimaker Community") + width: parent.width + text: catalog.i18nc("@text", "Share ideas and get help from 48,000+ users in the Ultimaker Community") + wrapMode: Text.Wrap horizontalAlignment: Text.AlignHCenter color: UM.Theme.getColor("text") - font: UM.Theme.getFont("tiny") + font: UM.Theme.getFont("default") renderType: Text.NativeRendering } } @@ -161,7 +195,6 @@ Item Cura.PrimaryButton { id: signInButton - anchors.margins: UM.Theme.getSize("default_margin").width anchors.horizontalCenter: parent.horizontalCenter text: catalog.i18nc("@button", "Sign in") onClicked: Cura.API.account.login() @@ -176,26 +209,13 @@ Item } } - // Create an account link - Label + // Create an account button + Cura.TertiaryButton { - id: createAccountLabel - width: parent.width + id: createAccountButton anchors.horizontalCenter: parent.horizontalCenter - horizontalAlignment: Text.AlignHCenter - text: - { - var t1 = catalog.i18nc("@text", "Create a free Ultimaker Account") - var t = "" + t1 + "" - return t - } - textFormat: Text.RichText - wrapMode: Text.WordWrap - font: UM.Theme.getFont("medium") - color: UM.Theme.getColor("text") - linkColor: UM.Theme.getColor("text_link") - onLinkActivated: Qt.openUrlExternally(CuraApplication.ultimakerCloudAccountRootUrl + "/app/create") - renderType: Text.NativeRendering + text: catalog.i18nc("@text", "Create a free Ultimaker Account") + onClicked: Qt.openUrlExternally(CuraApplication.ultimakerCloudAccountRootUrl + "/app/create") } } } From 18c0510727e7671614b549556625b2134c1d70f3 Mon Sep 17 00:00:00 2001 From: Kostas Karmas Date: Thu, 25 Mar 2021 09:00:14 +0100 Subject: [PATCH 19/27] Fix review comments in WelcomeContent.qml CURA-8094 --- resources/qml/WelcomePages/WelcomeContent.qml | 60 +++++++++++-------- 1 file changed, 36 insertions(+), 24 deletions(-) diff --git a/resources/qml/WelcomePages/WelcomeContent.qml b/resources/qml/WelcomePages/WelcomeContent.qml index 6e05cad010..1b1eab9893 100644 --- a/resources/qml/WelcomePages/WelcomeContent.qml +++ b/resources/qml/WelcomePages/WelcomeContent.qml @@ -21,40 +21,52 @@ Item anchors.verticalCenter: parent.verticalCenter spacing: UM.Theme.getSize("thick_margin").height + + // Filler item + Item + { + height: UM.Theme.getSize("thick_margin").width + width: parent.width + } + Image { id: curaImage anchors.horizontalCenter: parent.horizontalCenter source: UM.Theme.getImage("first_run_welcome_cura") - scale: 0.666 + fillMode: Image.PreserveAspectFit + width: UM.Theme.getSize("welcome_wizard_content_image_big").width + sourceSize.width: width + sourceSize.height: height } - Column + // Filler item + Item { + height: UM.Theme.getSize("thick_margin").width + width: parent.width + } + + Label + { + id: titleLabel anchors.horizontalCenter: parent.horizontalCenter - spacing: UM.Theme.getSize("thick_margin").height + horizontalAlignment: Text.AlignHCenter + text: catalog.i18nc("@label", "Welcome to Ultimaker Cura") + color: UM.Theme.getColor("primary_button") + font: UM.Theme.getFont("huge_bold") + renderType: Text.NativeRendering + } - 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("huge_bold") - renderType: Text.NativeRendering - } - - Label - { - id: textLabel - anchors.horizontalCenter: parent.horizontalCenter - horizontalAlignment: Text.AlignHCenter - text: catalog.i18nc("@text", "Please follow these steps to set up Ultimaker Cura.\nThis will only take a few moments.") - font: UM.Theme.getFont("medium") - color: UM.Theme.getColor("text") - renderType: Text.NativeRendering - } + Label + { + id: textLabel + anchors.horizontalCenter: parent.horizontalCenter + horizontalAlignment: Text.AlignHCenter + text: catalog.i18nc("@text", "Please follow these steps to set up Ultimaker Cura.\nThis will only take a few moments.") + font: UM.Theme.getFont("medium") + color: UM.Theme.getColor("text") + renderType: Text.NativeRendering } // Filler item From e55e15792569481123c0220047d73f60dce33914 Mon Sep 17 00:00:00 2001 From: Kostas Karmas Date: Thu, 25 Mar 2021 09:05:49 +0100 Subject: [PATCH 20/27] Change label text to not contain a new line character CURA-8094 --- resources/qml/WelcomePages/WelcomeContent.qml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/resources/qml/WelcomePages/WelcomeContent.qml b/resources/qml/WelcomePages/WelcomeContent.qml index 1b1eab9893..45a0bf4a7c 100644 --- a/resources/qml/WelcomePages/WelcomeContent.qml +++ b/resources/qml/WelcomePages/WelcomeContent.qml @@ -20,6 +20,7 @@ Item anchors.horizontalCenter: parent.horizontalCenter anchors.verticalCenter: parent.verticalCenter spacing: UM.Theme.getSize("thick_margin").height + width:parent.width // Filler item @@ -63,7 +64,9 @@ Item id: textLabel anchors.horizontalCenter: parent.horizontalCenter horizontalAlignment: Text.AlignHCenter - text: catalog.i18nc("@text", "Please follow these steps to set up Ultimaker Cura.\nThis will only take a few moments.") + width: titleLabel.width + 2 * UM.Theme.getSize("thick_margin").width + text: catalog.i18nc("@text", "Please follow these steps to set up Ultimaker Cura. This will only take a few moments.") + wrapMode: Text.Wrap font: UM.Theme.getFont("medium") color: UM.Theme.getColor("text") renderType: Text.NativeRendering From 2ed40fe2c6e72814cdcd9abbaaa2e2bb95c4c7a0 Mon Sep 17 00:00:00 2001 From: pnt103 <54410389+pnt103@users.noreply.github.com> Date: Thu, 25 Mar 2021 09:19:45 +0100 Subject: [PATCH 21/27] Get last position from previous layer instead. Old code was next-next layer, which is actually the layer _after_ the one that is meant. Fixes #9430 CURA-8116 --- .../PostProcessingPlugin/scripts/PauseAtHeight.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py b/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py index 4c3c9b4f33..eea4d38560 100644 --- a/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py +++ b/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py @@ -338,11 +338,6 @@ class PauseAtHeight(Script): if current_layer < pause_layer - nbr_negative_layers: continue - # Get X and Y from the next layer (better position for - # the nozzle) - next_layer = data[index + 1] - x, y = self.getNextXY(next_layer) - prev_layer = data[index - 1] prev_lines = prev_layer.split("\n") current_e = 0. @@ -353,6 +348,13 @@ class PauseAtHeight(Script): current_e = self.getValue(prevLine, "E", -1) if current_e >= 0: break + # and also find last X,Y + for prevLine in reversed(prev_lines): + if prevLine.startswith(("G0", "G1", "G2", "G3")): + if self.getValue(prevLine, "X") is not None and self.getValue(prevLine, "Y") is not None: + x = self.getValue(prevLine, "X") + y = self.getValue(prevLine, "Y") + break # Maybe redo the last layer. if redo_layer: From 55cb7f88a7744833eec3a6e20701bab613ec73cb Mon Sep 17 00:00:00 2001 From: Kostas Karmas Date: Thu, 25 Mar 2021 12:47:07 +0100 Subject: [PATCH 22/27] Change bottom left button text to "Skip" Or else the page shows two buttons "Next" buttons. CURA-8014 --- cura/UI/WelcomePagesModel.py | 1 + 1 file changed, 1 insertion(+) diff --git a/cura/UI/WelcomePagesModel.py b/cura/UI/WelcomePagesModel.py index b816833d67..3fdcebe0a0 100644 --- a/cura/UI/WelcomePagesModel.py +++ b/cura/UI/WelcomePagesModel.py @@ -241,6 +241,7 @@ class WelcomePagesModel(ListModel): }, {"id": "whats_new", "page_url": self._getBuiltinWelcomePagePath("WhatsNewContent.qml"), + "next_page_button_text": self._catalog.i18nc("@action:button", "Skip"), }, {"id": "data_collections", "page_url": self._getBuiltinWelcomePagePath("DataCollectionsContent.qml"), From 7af6ea5cc54f6ad2b8486fbc30af56ce30af3e99 Mon Sep 17 00:00:00 2001 From: Kostas Karmas Date: Thu, 25 Mar 2021 12:51:07 +0100 Subject: [PATCH 23/27] Remove unnecessary horizontalCenter anchor Left and right anchors can't work at the same time with the horizontalCenter. In this case it makes more sence to remove the horizontalCenter, since the left and right ones also define the width of the rectangle. CURA-8014 --- resources/qml/WelcomePages/WhatsNewContent.qml | 1 - 1 file changed, 1 deletion(-) diff --git a/resources/qml/WelcomePages/WhatsNewContent.qml b/resources/qml/WelcomePages/WhatsNewContent.qml index ca8c758620..c5f061ed6a 100644 --- a/resources/qml/WelcomePages/WhatsNewContent.qml +++ b/resources/qml/WelcomePages/WhatsNewContent.qml @@ -47,7 +47,6 @@ Item bottom: whatsNewDots.top left: parent.left right: parent.right - horizontalCenter: parent.horizontalCenter margins: UM.Theme.getSize("default_margin").width * 2 } From 179d77ef5cc3ee1608fa7f17c7a40fc7bacc4f4f Mon Sep 17 00:00:00 2001 From: Kostas Karmas Date: Thu, 25 Mar 2021 13:29:17 +0100 Subject: [PATCH 24/27] Transfer the "What's new" and "Changelog" pages at the end of wizard To match the requirements specified in the ticket. CURA-8014 --- cura/UI/WelcomePagesModel.py | 16 ++++++++++------ .../qml/WelcomePages/AddCloudPrintersView.qml | 2 +- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/cura/UI/WelcomePagesModel.py b/cura/UI/WelcomePagesModel.py index 3fdcebe0a0..3c2d0503ab 100644 --- a/cura/UI/WelcomePagesModel.py +++ b/cura/UI/WelcomePagesModel.py @@ -239,10 +239,6 @@ class WelcomePagesModel(ListModel): {"id": "user_agreement", "page_url": self._getBuiltinWelcomePagePath("UserAgreementContent.qml"), }, - {"id": "whats_new", - "page_url": self._getBuiltinWelcomePagePath("WhatsNewContent.qml"), - "next_page_button_text": self._catalog.i18nc("@action:button", "Skip"), - }, {"id": "data_collections", "page_url": self._getBuiltinWelcomePagePath("DataCollectionsContent.qml"), }, @@ -260,13 +256,21 @@ class WelcomePagesModel(ListModel): }, {"id": "add_cloud_printers", "page_url": self._getBuiltinWelcomePagePath("AddCloudPrintersView.qml"), - "is_final_page": True, # If we end up in this page, the next button will close the dialog - "next_page_button_text": self._catalog.i18nc("@action:button", "Finish"), + "next_page_button_text": self._catalog.i18nc("@action:button", "Next"), + "next_page_id": "whats_new", }, {"id": "machine_actions", "page_url": self._getBuiltinWelcomePagePath("FirstStartMachineActionsContent.qml"), "should_show_function": self.shouldShowMachineActions, }, + {"id": "whats_new", + "page_url": self._getBuiltinWelcomePagePath("WhatsNewContent.qml"), + "next_page_button_text": self._catalog.i18nc("@action:button", "Skip"), + }, + {"id": "changelog", + "page_url": self._getBuiltinWelcomePagePath("ChangelogContent.qml"), + "next_page_button_text": self._catalog.i18nc("@action:button", "Finish"), + }, ] pages_to_show = all_pages_list diff --git a/resources/qml/WelcomePages/AddCloudPrintersView.qml b/resources/qml/WelcomePages/AddCloudPrintersView.qml index 32e6ffec39..524bf288a0 100644 --- a/resources/qml/WelcomePages/AddCloudPrintersView.qml +++ b/resources/qml/WelcomePages/AddCloudPrintersView.qml @@ -215,7 +215,7 @@ Item id: finishButton anchors.right: parent.right anchors.bottom: parent.bottom - text: catalog.i18nc("@button", "Finish") + text: base.currentItem.next_page_button_text onClicked: { discoveredCloudPrintersModel.clear() From 839ac63241c64993638debcb907381c1c99745fd Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Thu, 25 Mar 2021 15:26:24 +0100 Subject: [PATCH 25/27] Darker inactive dots in Whats New. CURA-8014 --- resources/qml/WelcomePages/WhatsNewContent.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/qml/WelcomePages/WhatsNewContent.qml b/resources/qml/WelcomePages/WhatsNewContent.qml index c5f061ed6a..c9c19f1bb0 100644 --- a/resources/qml/WelcomePages/WhatsNewContent.qml +++ b/resources/qml/WelcomePages/WhatsNewContent.qml @@ -158,7 +158,7 @@ Item color: index === whatsNewViewport.currentIndex ? UM.Theme.getColor("primary") : - UM.Theme.getColor("viewport_overlay") + UM.Theme.getColor("secondary_button_shadow") } } From 4e80ac5138021f9d8ca06fd5833bbf535ae0b5dd Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Thu, 25 Mar 2021 15:53:08 +0100 Subject: [PATCH 26/27] Use alignment instead of anchors Since it's within a layout, you can't use anchors CURA-8014 --- resources/qml/WelcomePages/WhatsNewContent.qml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/resources/qml/WelcomePages/WhatsNewContent.qml b/resources/qml/WelcomePages/WhatsNewContent.qml index c9c19f1bb0..68be6379d6 100644 --- a/resources/qml/WelcomePages/WhatsNewContent.qml +++ b/resources/qml/WelcomePages/WhatsNewContent.qml @@ -80,12 +80,7 @@ Item Rectangle { - anchors - { - top: parent.top - topMargin: UM.Theme.getSize("default_margin").width / 2 - horizontalCenter: parent.horizontalCenter - } + Layout.alignment: Qt.AlignHCenter color: UM.Theme.getColor("viewport_overlay") Image From 729d3afd3255c4c28507619e9aac344df5fdafdd Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Fri, 26 Mar 2021 11:26:03 +0100 Subject: [PATCH 27/27] Workaround discinction model/models/group. Fixes #9448 --- resources/qml/Actions.qml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/qml/Actions.qml b/resources/qml/Actions.qml index 78c4958598..46a876003e 100644 --- a/resources/qml/Actions.qml +++ b/resources/qml/Actions.qml @@ -262,7 +262,7 @@ Item Action { id: deleteSelectionAction; - text: catalog.i18ncp("@action:inmenu menubar:edit", "Delete Selected Model", "Delete Selected Models", UM.Selection.selectionCount); + text: catalog.i18nc("@action:inmenu menubar:edit", "Delete Selected"); enabled: UM.Controller.toolsEnabled && UM.Selection.hasSelection; iconName: "edit-delete"; shortcut: StandardKey.Delete | "Backspace" @@ -272,7 +272,7 @@ Item Action { id: centerSelectionAction; - text: catalog.i18ncp("@action:inmenu menubar:edit", "Center Selected Model", "Center Selected Models", UM.Selection.selectionCount); + text: catalog.i18nc("@action:inmenu menubar:edit", "Center Selected"); enabled: UM.Controller.toolsEnabled && UM.Selection.hasSelection; iconName: "align-vertical-center"; onTriggered: CuraActions.centerSelection(); @@ -281,7 +281,7 @@ Item Action { id: multiplySelectionAction; - text: catalog.i18ncp("@action:inmenu menubar:edit", "Multiply Selected Model", "Multiply Selected Models", UM.Selection.selectionCount); + text: catalog.i18nc("@action:inmenu menubar:edit", "Multiply Selected"); enabled: UM.Controller.toolsEnabled && UM.Selection.hasSelection; iconName: "edit-duplicate"; shortcut: "Ctrl+M"