diff --git a/cura/UltimakerCloudAuthentication.py b/cura/UltimakerCloudAuthentication.py index ac752231b9..5f69329dbb 100644 --- a/cura/UltimakerCloudAuthentication.py +++ b/cura/UltimakerCloudAuthentication.py @@ -10,6 +10,8 @@ DEFAULT_CLOUD_ACCOUNT_API_ROOT = "https://account.ultimaker.com" # type: str try: from cura.CuraVersion import CuraCloudAPIRoot # type: ignore + if CuraCloudAPIRoot == "": + CuraCloudAPIRoot = DEFAULT_CLOUD_API_ROOT except ImportError: CuraCloudAPIRoot = DEFAULT_CLOUD_API_ROOT @@ -20,5 +22,7 @@ except ImportError: try: from cura.CuraVersion import CuraCloudAccountAPIRoot # type: ignore + if CuraCloudAccountAPIRoot == "": + CuraCloudAccountAPIRoot = DEFAULT_CLOUD_ACCOUNT_API_ROOT except ImportError: CuraCloudAccountAPIRoot = DEFAULT_CLOUD_ACCOUNT_API_ROOT diff --git a/plugins/PostProcessingPlugin/PostProcessingPlugin.qml b/plugins/PostProcessingPlugin/PostProcessingPlugin.qml index d5fe618b2d..cd8303d1d3 100644 --- a/plugins/PostProcessingPlugin/PostProcessingPlugin.qml +++ b/plugins/PostProcessingPlugin/PostProcessingPlugin.qml @@ -488,7 +488,7 @@ UM.Dialog { objectName: "postProcessingSaveAreaButton" visible: activeScriptsList.count > 0 - height: UM.Theme.getSize("save_button_save_to_button").height + height: UM.Theme.getSize("action_button").height width: height tooltip: catalog.i18nc("@info:tooltip", "Change active post-processing scripts") onClicked: dialog.show() diff --git a/plugins/Toolbox/resources/qml/ToolboxDetailTileActions.qml b/plugins/Toolbox/resources/qml/ToolboxDetailTileActions.qml index 7160dafa2d..87fc5d6955 100644 --- a/plugins/Toolbox/resources/qml/ToolboxDetailTileActions.qml +++ b/plugins/Toolbox/resources/qml/ToolboxDetailTileActions.qml @@ -91,5 +91,10 @@ Column target: toolbox onInstallChanged: installed = toolbox.isInstalled(model.id) onMetadataChanged: canUpdate = toolbox.canUpdate(model.id) + onFilterChanged: + { + installed = toolbox.isInstalled(model.id) + canUpdate = toolbox.canUpdate(model.id) + } } } diff --git a/plugins/UM3NetworkPrinting/resources/qml/MonitorQueue.qml b/plugins/UM3NetworkPrinting/resources/qml/MonitorQueue.qml index 124b268300..f2dc09de95 100644 --- a/plugins/UM3NetworkPrinting/resources/qml/MonitorQueue.qml +++ b/plugins/UM3NetworkPrinting/resources/qml/MonitorQueue.qml @@ -42,8 +42,8 @@ Item { id: externalLinkIcon anchors.verticalCenter: manageQueueLabel.verticalCenter - color: UM.Theme.getColor("primary") - source: "../svg/icons/external_link.svg" + color: UM.Theme.getColor("text_link") + source: UM.Theme.getIcon("external_link") width: 16 * screenScaleFactor // TODO: Theme! (Y U NO USE 18 LIKE ALL OTHER ICONS?!) height: 16 * screenScaleFactor // TODO: Theme! (Y U NO USE 18 LIKE ALL OTHER ICONS?!) } @@ -56,10 +56,11 @@ Item leftMargin: 6 * screenScaleFactor // TODO: Theme! verticalCenter: externalLinkIcon.verticalCenter } - color: UM.Theme.getColor("primary") + color: UM.Theme.getColor("text_link") font: UM.Theme.getFont("default") // 12pt, regular - linkColor: UM.Theme.getColor("primary") + linkColor: UM.Theme.getColor("text_link") text: catalog.i18nc("@label link to connect manager", "Manage queue in Cura Connect") + renderType: Text.NativeRendering } } diff --git a/resources/qml/ActionPanel/OutputProcessWidget.qml b/resources/qml/ActionPanel/OutputProcessWidget.qml index 15214f212c..63974d7f34 100644 --- a/resources/qml/ActionPanel/OutputProcessWidget.qml +++ b/resources/qml/ActionPanel/OutputProcessWidget.qml @@ -31,6 +31,13 @@ Column id: information width: parent.width height: childrenRect.height + + PrintInformationWidget + { + id: printInformationPanel + visible: !preSlicedData + anchors.right: parent.right + } Column { @@ -50,15 +57,7 @@ Column text: preSlicedData ? catalog.i18nc("@label", "No time estimation available") : PrintInformation.currentPrintTime.getDisplayString(UM.DurationFormat.Long) source: UM.Theme.getIcon("clock") - font: UM.Theme.getFont("large_bold") - - PrintInformationWidget - { - id: printInformationPanel - visible: !preSlicedData - anchors.left: parent.left - anchors.leftMargin: parent.contentWidth + UM.Theme.getSize("default_margin").width - } + font: UM.Theme.getFont("medium_bold") } Cura.IconWithText @@ -91,43 +90,8 @@ Column return totalWeights + "g ยท " + totalLengths.toFixed(2) + "m" } source: UM.Theme.getIcon("spool") - - Item - { - id: additionalComponents - width: childrenRect.width - anchors.right: parent.right - height: parent.height - Row - { - id: additionalComponentsRow - anchors.right: parent.right - anchors.bottom: parent.bottom - spacing: UM.Theme.getSize("default_margin").width - } - } - Component.onCompleted: addAdditionalComponents("saveButton") - - Connections - { - target: CuraApplication - onAdditionalComponentsChanged: addAdditionalComponents("saveButton") - } - - function addAdditionalComponents (areaId) - { - if(areaId == "saveButton") - { - for (var component in CuraApplication.additionalComponents["saveButton"]) - { - CuraApplication.additionalComponents["saveButton"][component].parent = additionalComponentsRow - } - } - } } } - - } Item diff --git a/resources/qml/ActionPanel/SliceProcessWidget.qml b/resources/qml/ActionPanel/SliceProcessWidget.qml index 0f415a6a2d..08966ce82c 100644 --- a/resources/qml/ActionPanel/SliceProcessWidget.qml +++ b/resources/qml/ActionPanel/SliceProcessWidget.qml @@ -110,8 +110,7 @@ Column height: parent.height - anchors.right: additionalComponents.left - anchors.rightMargin: additionalComponents.width != 0 ? UM.Theme.getSize("default_margin").width : 0 + anchors.right: parent.right anchors.left: parent.left text: catalog.i18nc("@button", "Slice") @@ -128,45 +127,12 @@ Column height: parent.height anchors.left: parent.left - anchors.right: additionalComponents.left - anchors.rightMargin: additionalComponents.width != 0 ? UM.Theme.getSize("default_margin").width : 0 + anchors.right: parent.right text: catalog.i18nc("@button", "Cancel") enabled: sliceButton.enabled visible: !sliceButton.visible onClicked: sliceOrStopSlicing() } - - Item - { - id: additionalComponents - width: childrenRect.width - anchors.right: parent.right - height: parent.height - Row - { - id: additionalComponentsRow - anchors.verticalCenter: parent.verticalCenter - spacing: UM.Theme.getSize("default_margin").width - } - } - Component.onCompleted: prepareButtons.addAdditionalComponents("saveButton") - - Connections - { - target: CuraApplication - onAdditionalComponentsChanged: prepareButtons.addAdditionalComponents("saveButton") - } - - function addAdditionalComponents (areaId) - { - if(areaId == "saveButton") - { - for (var component in CuraApplication.additionalComponents["saveButton"]) - { - CuraApplication.additionalComponents["saveButton"][component].parent = additionalComponentsRow - } - } - } } diff --git a/resources/qml/Cura.qml b/resources/qml/Cura.qml index 4a031e33fa..f3d2e7295a 100644 --- a/resources/qml/Cura.qml +++ b/resources/qml/Cura.qml @@ -248,6 +248,7 @@ UM.MainWindow Cura.ActionPanelWidget { + id: actionPanelWidget anchors.right: parent.right anchors.bottom: parent.bottom anchors.rightMargin: UM.Theme.getSize("thick_margin").width @@ -269,6 +270,39 @@ UM.MainWindow visible: CuraApplication.platformActivity && (main.item == null || !qmlTypeOf(main.item, "QQuickRectangle")) } + Item + { + id: additionalComponents + width: childrenRect.width + anchors.right: actionPanelWidget.left + anchors.rightMargin: UM.Theme.getSize("default_margin").width + anchors.bottom: actionPanelWidget.bottom + anchors.bottomMargin: UM.Theme.getSize("thick_margin").height * 2 + visible: actionPanelWidget.visible + Row + { + id: additionalComponentsRow + anchors.verticalCenter: parent.verticalCenter + spacing: UM.Theme.getSize("default_margin").width + } + } + + Component.onCompleted: contentItem.addAdditionalComponents() + + Connections + { + target: CuraApplication + onAdditionalComponentsChanged: contentItem.addAdditionalComponents("saveButton") + } + + function addAdditionalComponents() + { + for (var component in CuraApplication.additionalComponents["saveButton"]) + { + CuraApplication.additionalComponents["saveButton"][component].parent = additionalComponentsRow + } + } + Loader { // A stage can control this area. If nothing is set, it will therefore show the 3D view. diff --git a/resources/qml/Menus/ConfigurationMenu/ConfigurationListView.qml b/resources/qml/Menus/ConfigurationMenu/ConfigurationListView.qml index e57b21cb78..15d882fdf5 100644 --- a/resources/qml/Menus/ConfigurationMenu/ConfigurationListView.qml +++ b/resources/qml/Menus/ConfigurationMenu/ConfigurationListView.qml @@ -23,7 +23,7 @@ Item } } - // This component will appear when there is no configurations (e.g. when losing connection) + // This component will appear when there are no configurations (e.g. when losing connection or when they are being loaded) Item { width: parent.width @@ -51,7 +51,11 @@ Item anchors.left: icon.right anchors.right: parent.right anchors.leftMargin: UM.Theme.getSize("default_margin").width - text: catalog.i18nc("@label", "Downloading the configurations from the remote printer") + // There are two cases that we want to diferenciate, one is when Cura is loading the configurations and the + // other when the connection was lost + text: Cura.MachineManager.printerConnected ? + catalog.i18nc("@label", "Loading available configurations from the printer...") : + catalog.i18nc("@label", "The configurations are not available because the printer is disconnected.") color: UM.Theme.getColor("text") font: UM.Theme.getFont("default") renderType: Text.NativeRendering diff --git a/resources/qml/Menus/ConfigurationMenu/ConfigurationMenu.qml b/resources/qml/Menus/ConfigurationMenu/ConfigurationMenu.qml index 3001efac54..7d09f4be38 100644 --- a/resources/qml/Menus/ConfigurationMenu/ConfigurationMenu.qml +++ b/resources/qml/Menus/ConfigurationMenu/ConfigurationMenu.qml @@ -173,6 +173,59 @@ Cura.ExpandablePopup } } + Item + { + height: visible ? childrenRect.height: 0 + anchors.right: parent.right + anchors.rightMargin: UM.Theme.getSize("default_margin").width + width: childrenRect.width + UM.Theme.getSize("default_margin").width + visible: popupItem.configuration_method == ConfigurationMenu.ConfigurationMethod.Custom + UM.RecolorImage + { + id: externalLinkIcon + anchors.left: parent.left + anchors.leftMargin: UM.Theme.getSize("default_margin").width + height: materialInfoLabel.height + width: height + sourceSize.height: width + color: UM.Theme.getColor("text_link") + source: UM.Theme.getIcon("external_link") + } + + Label + { + id: materialInfoLabel + wrapMode: Text.WordWrap + text: catalog.i18nc("@label", "See the material compatibility chart") + font: UM.Theme.getFont("default") + color: UM.Theme.getColor("text_link") + linkColor: UM.Theme.getColor("text_link") + anchors.left: externalLinkIcon.right + anchors.leftMargin: UM.Theme.getSize("narrow_margin").width + renderType: Text.NativeRendering + + MouseArea + { + anchors.fill: parent + hoverEnabled: true + onClicked: + { + // open the material URL with web browser + var url = "https://ultimaker.com/incoming-links/cura/material-compatibilty" + Qt.openUrlExternally(url) + } + onEntered: + { + materialInfoLabel.font.underline = true + } + onExited: + { + materialInfoLabel.font.underline = false + } + } + } + } + Rectangle { id: separator diff --git a/plugins/UM3NetworkPrinting/resources/svg/icons/external_link.svg b/resources/themes/cura-light/icons/external_link.svg similarity index 100% rename from plugins/UM3NetworkPrinting/resources/svg/icons/external_link.svg rename to resources/themes/cura-light/icons/external_link.svg