From 99f42c179f856b4b1f7bff48c65236ef83fe2b20 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Thu, 8 Oct 2020 17:18:24 +0200 Subject: [PATCH 1/6] Remove hardcoded value for num extruders CURA-7745 --- .../resources/qml/MonitorPrinterCard.qml | 3 +-- .../src/Models/Http/ClusterPrinterStatus.py | 7 +------ 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/plugins/UM3NetworkPrinting/resources/qml/MonitorPrinterCard.qml b/plugins/UM3NetworkPrinting/resources/qml/MonitorPrinterCard.qml index 6416558fe7..59cdeef174 100644 --- a/plugins/UM3NetworkPrinting/resources/qml/MonitorPrinterCard.qml +++ b/plugins/UM3NetworkPrinting/resources/qml/MonitorPrinterCard.qml @@ -194,8 +194,7 @@ Item var configs = [] if (printer) { - configs.push(printer.printerConfiguration.extruderConfigurations[0]) - configs.push(printer.printerConfiguration.extruderConfigurations[1]) + configs = configs.concat(printer.printerConfiguration.extruderConfigurations) } else { diff --git a/plugins/UM3NetworkPrinting/src/Models/Http/ClusterPrinterStatus.py b/plugins/UM3NetworkPrinting/src/Models/Http/ClusterPrinterStatus.py index 5b4d7fb161..b5fae5d9c7 100644 --- a/plugins/UM3NetworkPrinting/src/Models/Http/ClusterPrinterStatus.py +++ b/plugins/UM3NetworkPrinting/src/Models/Http/ClusterPrinterStatus.py @@ -71,12 +71,7 @@ class ClusterPrinterStatus(BaseModel): :param controller: - The controller of the model. """ - - # FIXME - # Note that we're using '2' here as extruder count. We have hardcoded this for now to prevent issues where the - # amount of extruders coming back from the API is actually lower (which it can be if a printer was just added - # to a cluster). This should be fixed in the future, probably also on the cluster API side. - model = PrinterOutputModel(controller, 2, firmware_version = self.firmware_version) + model = PrinterOutputModel(controller, len(self.configuration), firmware_version = self.firmware_version) self.updateOutputModel(model) return model From 910d8ec472fbc1385e6f2942a716b4f76ae73101 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Thu, 8 Oct 2020 17:22:24 +0200 Subject: [PATCH 2/6] Fix reference error CURA-7745 --- .../UM3NetworkPrinting/resources/qml/MonitorPrinterCard.qml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/UM3NetworkPrinting/resources/qml/MonitorPrinterCard.qml b/plugins/UM3NetworkPrinting/resources/qml/MonitorPrinterCard.qml index 59cdeef174..ef9fda257d 100644 --- a/plugins/UM3NetworkPrinting/resources/qml/MonitorPrinterCard.qml +++ b/plugins/UM3NetworkPrinting/resources/qml/MonitorPrinterCard.qml @@ -271,7 +271,8 @@ Item } // For cloud printing, add this mouse area over the disabled cameraButton to indicate that it's not available - MouseArea + //Warning message is commented out because it's factually incorrect. Fix CURA-7637 to allow camera connections via cloud. + /* MouseArea { id: cameraDisabledButtonArea anchors.fill: cameraButton @@ -281,7 +282,7 @@ Item enabled: !cameraButton.enabled } - /* //Warning message is commented out because it's factually incorrect. Fix CURA-7637 to allow camera connections via cloud. + MonitorInfoBlurb { id: cameraDisabledInfo From 3e67d208902eac21ec5f834c2ca2510f8f568add Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Thu, 8 Oct 2020 17:31:19 +0200 Subject: [PATCH 3/6] Remove monitor_text_primary It's so close to the text one that it really doesn't make sense to keep it. Boyscouting the code a bit here CURA-7745 --- plugins/MonitorStage/MonitorMain.qml | 4 ++-- .../resources/qml/MonitorBuildplateConfiguration.qml | 2 +- .../resources/qml/MonitorCarousel.qml | 4 ++-- .../resources/qml/MonitorContextMenuButton.qml | 2 +- .../resources/qml/MonitorExtruderConfiguration.qml | 4 ++-- .../resources/qml/MonitorIconExtruder.qml | 2 +- .../resources/qml/MonitorPrintJobCard.qml | 8 ++++---- .../resources/qml/MonitorPrintJobProgressBar.qml | 4 ++-- .../resources/qml/MonitorPrinterCard.qml | 12 ++++++------ .../resources/qml/MonitorPrinterPill.qml | 2 +- .../resources/qml/MonitorQueue.qml | 10 +++++----- .../resources/qml/PrintJobContextMenuItem.qml | 2 +- resources/themes/cura-dark/theme.json | 1 - resources/themes/cura-light/theme.json | 1 - 14 files changed, 28 insertions(+), 30 deletions(-) diff --git a/plugins/MonitorStage/MonitorMain.qml b/plugins/MonitorStage/MonitorMain.qml index b24ed4ce1b..56f916dc25 100644 --- a/plugins/MonitorStage/MonitorMain.qml +++ b/plugins/MonitorStage/MonitorMain.qml @@ -99,7 +99,7 @@ Rectangle visible: isNetworkConfigured && !isConnected text: catalog.i18nc("@info", "Please make sure your printer has a connection:\n- Check if the printer is turned on.\n- Check if the printer is connected to the network.\n- Check if you are signed in to discover cloud-connected printers.") font: UM.Theme.getFont("medium") - color: UM.Theme.getColor("monitor_text_primary") + color: UM.Theme.getColor("text") wrapMode: Text.WordWrap lineHeight: UM.Theme.getSize("monitor_text_line_large").height lineHeightMode: Text.FixedHeight @@ -116,7 +116,7 @@ Rectangle visible: !isNetworkConfigured && isNetworkConfigurable text: catalog.i18nc("@info", "Please connect your printer to the network.") font: UM.Theme.getFont("medium") - color: UM.Theme.getColor("monitor_text_primary") + color: UM.Theme.getColor("text") wrapMode: Text.WordWrap width: contentWidth lineHeight: UM.Theme.getSize("monitor_text_line_large").height diff --git a/plugins/UM3NetworkPrinting/resources/qml/MonitorBuildplateConfiguration.qml b/plugins/UM3NetworkPrinting/resources/qml/MonitorBuildplateConfiguration.qml index 5d08422877..2034c23abe 100644 --- a/plugins/UM3NetworkPrinting/resources/qml/MonitorBuildplateConfiguration.qml +++ b/plugins/UM3NetworkPrinting/resources/qml/MonitorBuildplateConfiguration.qml @@ -60,7 +60,7 @@ Item Label { id: buildplateLabel - color: UM.Theme.getColor("monitor_text_primary") + color: UM.Theme.getColor("text") elide: Text.ElideRight font: UM.Theme.getFont("default") // 12pt, regular text: buildplate ? buildplate : "" diff --git a/plugins/UM3NetworkPrinting/resources/qml/MonitorCarousel.qml b/plugins/UM3NetworkPrinting/resources/qml/MonitorCarousel.qml index 08743ed777..56e39bd477 100644 --- a/plugins/UM3NetworkPrinting/resources/qml/MonitorCarousel.qml +++ b/plugins/UM3NetworkPrinting/resources/qml/MonitorCarousel.qml @@ -97,7 +97,7 @@ Item height: width // TODO: Theme! sourceSize.width: width // TODO: Theme! sourceSize.height: width // TODO: Theme! - color: UM.Theme.getColor("monitor_text_primary") + color: UM.Theme.getColor("text") source: UM.Theme.getIcon("arrow_left") } } @@ -176,7 +176,7 @@ Item height: width // TODO: Theme! sourceSize.width: width // TODO: Theme! sourceSize.height: width // TODO: Theme! - color: UM.Theme.getColor("monitor_text_primary") + color: UM.Theme.getColor("text") source: UM.Theme.getIcon("arrow_right") } } diff --git a/plugins/UM3NetworkPrinting/resources/qml/MonitorContextMenuButton.qml b/plugins/UM3NetworkPrinting/resources/qml/MonitorContextMenuButton.qml index aa5d6de89b..0be3732cef 100644 --- a/plugins/UM3NetworkPrinting/resources/qml/MonitorContextMenuButton.qml +++ b/plugins/UM3NetworkPrinting/resources/qml/MonitorContextMenuButton.qml @@ -18,7 +18,7 @@ Button width: base.width } contentItem: Label { - color: enabled ? UM.Theme.getColor("monitor_text_primary") : UM.Theme.getColor("monitor_text_disabled") + color: enabled ? UM.Theme.getColor("text") : UM.Theme.getColor("monitor_text_disabled") font.pixelSize: 32 * screenScaleFactor horizontalAlignment: Text.AlignHCenter text: base.text diff --git a/plugins/UM3NetworkPrinting/resources/qml/MonitorExtruderConfiguration.qml b/plugins/UM3NetworkPrinting/resources/qml/MonitorExtruderConfiguration.qml index 63caaab433..ac5f588db3 100644 --- a/plugins/UM3NetworkPrinting/resources/qml/MonitorExtruderConfiguration.qml +++ b/plugins/UM3NetworkPrinting/resources/qml/MonitorExtruderConfiguration.qml @@ -57,7 +57,7 @@ Item { id: materialLabel - color: UM.Theme.getColor("monitor_text_primary") + color: UM.Theme.getColor("text") elide: Text.ElideRight font: UM.Theme.getFont("default") // 12pt, regular text: "" @@ -87,7 +87,7 @@ Item { id: printCoreLabel - color: UM.Theme.getColor("monitor_text_primary") + color: UM.Theme.getColor("text") elide: Text.ElideRight font: UM.Theme.getFont("default_bold") // 12pt, bold text: "" diff --git a/plugins/UM3NetworkPrinting/resources/qml/MonitorIconExtruder.qml b/plugins/UM3NetworkPrinting/resources/qml/MonitorIconExtruder.qml index 876215d65d..8c6f28d3e1 100644 --- a/plugins/UM3NetworkPrinting/resources/qml/MonitorIconExtruder.qml +++ b/plugins/UM3NetworkPrinting/resources/qml/MonitorIconExtruder.qml @@ -39,7 +39,7 @@ Item { id: positionLabel font: UM.Theme.getFont("small") - color: UM.Theme.getColor("monitor_text_primary") + color: UM.Theme.getColor("text") height: Math.round(size / 2) horizontalAlignment: Text.AlignHCenter text: position + 1 diff --git a/plugins/UM3NetworkPrinting/resources/qml/MonitorPrintJobCard.qml b/plugins/UM3NetworkPrinting/resources/qml/MonitorPrintJobCard.qml index 78f9058765..65bf4e3a07 100644 --- a/plugins/UM3NetworkPrinting/resources/qml/MonitorPrintJobCard.qml +++ b/plugins/UM3NetworkPrinting/resources/qml/MonitorPrintJobCard.qml @@ -58,7 +58,7 @@ Item Label { text: printJob && printJob.name ? printJob.name : "" - color: UM.Theme.getColor("monitor_text_primary") + color: UM.Theme.getColor("text") elide: Text.ElideRight font: UM.Theme.getFont("medium") // 14pt, regular visible: printJob @@ -89,7 +89,7 @@ Item Label { text: printJob ? OutputDevice.formatDuration(printJob.timeTotal) : "" - color: UM.Theme.getColor("monitor_text_primary") + color: UM.Theme.getColor("text") elide: Text.ElideRight font: UM.Theme.getFont("medium") // 14pt, regular visible: printJob @@ -120,7 +120,7 @@ Item { id: printerAssignmentLabel anchors.verticalCenter: parent.verticalCenter - color: UM.Theme.getColor("monitor_text_primary") + color: UM.Theme.getColor("text") elide: Text.ElideRight font: UM.Theme.getFont("medium") // 14pt, regular text: { @@ -188,7 +188,7 @@ Item Label { text: printJob && printJob.owner ? printJob.owner : "" - color: UM.Theme.getColor("monitor_text_primary") + color: UM.Theme.getColor("text") elide: Text.ElideRight font: UM.Theme.getFont("medium") // 14pt, regular anchors.top: printerConfiguration.top diff --git a/plugins/UM3NetworkPrinting/resources/qml/MonitorPrintJobProgressBar.qml b/plugins/UM3NetworkPrinting/resources/qml/MonitorPrintJobProgressBar.qml index 0a478c8543..98cd3916fb 100644 --- a/plugins/UM3NetworkPrinting/resources/qml/MonitorPrintJobProgressBar.qml +++ b/plugins/UM3NetworkPrinting/resources/qml/MonitorPrintJobProgressBar.qml @@ -44,7 +44,7 @@ Item verticalCenter: parent.verticalCenter } text: printJob ? Math.round(printJob.progress * 100) + "%" : "0%" - color: printJob && printJob.isActive ? UM.Theme.getColor("monitor_text_primary") : UM.Theme.getColor("monitor_text_disabled") + color: printJob && printJob.isActive ? UM.Theme.getColor("text") : UM.Theme.getColor("monitor_text_disabled") width: contentWidth font: UM.Theme.getFont("default") // 12pt, regular @@ -62,7 +62,7 @@ Item leftMargin: UM.Theme.getSize("monitor_margin").width verticalCenter: parent.verticalCenter } - color: UM.Theme.getColor("monitor_text_primary") + color: UM.Theme.getColor("text") font: UM.Theme.getFont("default") text: { diff --git a/plugins/UM3NetworkPrinting/resources/qml/MonitorPrinterCard.qml b/plugins/UM3NetworkPrinting/resources/qml/MonitorPrinterCard.qml index ef9fda257d..2e9b3e74fb 100644 --- a/plugins/UM3NetworkPrinting/resources/qml/MonitorPrinterCard.qml +++ b/plugins/UM3NetworkPrinting/resources/qml/MonitorPrinterCard.qml @@ -103,7 +103,7 @@ Item Label { text: printer && printer.name ? printer.name : "" - color: UM.Theme.getColor("monitor_text_primary") + color: UM.Theme.getColor("text") elide: Text.ElideRight font: UM.Theme.getFont("large") // 16pt, bold width: parent.width @@ -341,7 +341,7 @@ Item { verticalCenter: parent.verticalCenter } - color: printer ? UM.Theme.getColor("monitor_text_primary") : UM.Theme.getColor("monitor_text_disabled") + color: printer ? UM.Theme.getColor("text") : UM.Theme.getColor("monitor_text_disabled") font: UM.Theme.getFont("large_bold") // 16pt, bold text: { if (!printer) { @@ -395,7 +395,7 @@ Item Label { id: printerJobNameLabel - color: printer && printer.activePrintJob && printer.activePrintJob.isActive ? UM.Theme.getColor("monitor_text_primary") : UM.Theme.getColor("monitor_text_disabled") + color: printer && printer.activePrintJob && printer.activePrintJob.isActive ? UM.Theme.getColor("text") : UM.Theme.getColor("monitor_text_disabled") elide: Text.ElideRight font: UM.Theme.getFont("large") // 16pt, bold text: printer && printer.activePrintJob ? printer.activePrintJob.name : catalog.i18nc("@label", "Untitled") @@ -416,7 +416,7 @@ Item topMargin: 6 * screenScaleFactor // TODO: Theme! left: printerJobNameLabel.left } - color: printer && printer.activePrintJob && printer.activePrintJob.isActive ? UM.Theme.getColor("monitor_text_primary") : UM.Theme.getColor("monitor_text_disabled") + color: printer && printer.activePrintJob && printer.activePrintJob.isActive ? UM.Theme.getColor("text") : UM.Theme.getColor("monitor_text_disabled") elide: Text.ElideRight font: UM.Theme.getFont("default") // 12pt, regular text: printer && printer.activePrintJob ? printer.activePrintJob.owner : catalog.i18nc("@label", "Anonymous") @@ -448,7 +448,7 @@ Item font: UM.Theme.getFont("default") text: catalog.i18nc("@label:status", "Requires configuration changes") visible: printer && printer.activePrintJob && printer.activePrintJob.configurationChanges.length > 0 && !printerStatus.visible - color: UM.Theme.getColor("monitor_text_primary") + color: UM.Theme.getColor("text") // FIXED-LINE-HEIGHT: height: 18 * screenScaleFactor // TODO: Theme! @@ -484,7 +484,7 @@ Item anchors.bottomMargin: 2 * screenScaleFactor // TODO: Theme! color: UM.Theme.getColor("monitor_secondary_button_text") font: UM.Theme.getFont("medium") // 14pt, regular - text: catalog.i18nc("@action:button","Details"); + text: catalog.i18nc("@action:button", "Details"); verticalAlignment: Text.AlignVCenter horizontalAlignment: Text.AlignHCenter height: 18 * screenScaleFactor // TODO: Theme! diff --git a/plugins/UM3NetworkPrinting/resources/qml/MonitorPrinterPill.qml b/plugins/UM3NetworkPrinting/resources/qml/MonitorPrinterPill.qml index 44aa1a1f8d..4cd9d58cae 100644 --- a/plugins/UM3NetworkPrinting/resources/qml/MonitorPrinterPill.qml +++ b/plugins/UM3NetworkPrinting/resources/qml/MonitorPrinterPill.qml @@ -27,7 +27,7 @@ Item Label { id: printerNameLabel anchors.centerIn: parent - color: UM.Theme.getColor("monitor_text_primary") + color: UM.Theme.getColor("text") text: monitorPrinterPill.text font.pointSize: 10 // TODO: Theme! visible: monitorPrinterPill.text !== "" diff --git a/plugins/UM3NetworkPrinting/resources/qml/MonitorQueue.qml b/plugins/UM3NetworkPrinting/resources/qml/MonitorQueue.qml index f5122dc685..0da22ce10e 100644 --- a/plugins/UM3NetworkPrinting/resources/qml/MonitorQueue.qml +++ b/plugins/UM3NetworkPrinting/resources/qml/MonitorQueue.qml @@ -26,7 +26,7 @@ Item left: queuedPrintJobs.left top: parent.top } - color: UM.Theme.getColor("monitor_text_primary") + color: UM.Theme.getColor("text") font: UM.Theme.getFont("large") text: catalog.i18nc("@label", "Queued") renderType: Text.NativeRendering @@ -97,7 +97,7 @@ Item Label { text: catalog.i18nc("@label", "There are no print jobs in the queue. Slice and send a job to add one.") - color: UM.Theme.getColor("monitor_text_primary") + color: UM.Theme.getColor("text") elide: Text.ElideRight font: UM.Theme.getFont("medium") // 14pt, regular anchors.verticalCenter: parent.verticalCenter @@ -112,7 +112,7 @@ Item Label { text: catalog.i18nc("@label", "Print jobs") - color: UM.Theme.getColor("monitor_text_primary") + color: UM.Theme.getColor("text") elide: Text.ElideRight font: UM.Theme.getFont("medium") // 14pt, regular anchors.verticalCenter: parent.verticalCenter @@ -128,7 +128,7 @@ Item Label { text: catalog.i18nc("@label", "Total print time") - color: UM.Theme.getColor("monitor_text_primary") + color: UM.Theme.getColor("text") elide: Text.ElideRight font: UM.Theme.getFont("medium") // 14pt, regular anchors.verticalCenter: parent.verticalCenter @@ -144,7 +144,7 @@ Item Label { text: catalog.i18nc("@label", "Waiting for") - color: UM.Theme.getColor("monitor_text_primary") + color: UM.Theme.getColor("text") elide: Text.ElideRight font: UM.Theme.getFont("medium") // 14pt, regular anchors.verticalCenter: parent.verticalCenter diff --git a/plugins/UM3NetworkPrinting/resources/qml/PrintJobContextMenuItem.qml b/plugins/UM3NetworkPrinting/resources/qml/PrintJobContextMenuItem.qml index 78b94ce259..3288896572 100644 --- a/plugins/UM3NetworkPrinting/resources/qml/PrintJobContextMenuItem.qml +++ b/plugins/UM3NetworkPrinting/resources/qml/PrintJobContextMenuItem.qml @@ -12,7 +12,7 @@ Button { color: UM.Theme.getColor("monitor_context_menu_hover") } contentItem: Label { - color: enabled ? UM.Theme.getColor("monitor_text_primary") : UM.Theme.getColor("monitor_text_disabled"); + color: enabled ? UM.Theme.getColor("text") : UM.Theme.getColor("monitor_text_disabled"); text: parent.text horizontalAlignment: Text.AlignLeft; verticalAlignment: Text.AlignVCenter; diff --git a/resources/themes/cura-dark/theme.json b/resources/themes/cura-dark/theme.json index 170fa98edc..e3266b923b 100644 --- a/resources/themes/cura-dark/theme.json +++ b/resources/themes/cura-dark/theme.json @@ -172,7 +172,6 @@ "toolbox_header_button_text_inactive": [128, 128, 128, 255], "monitor_printer_family_tag": [86, 86, 106, 255], - "monitor_text_primary": [229, 229, 229, 255], "monitor_text_disabled": [102, 102, 102, 255], "monitor_icon_primary": [229, 229, 229, 255], "monitor_icon_accent": [51, 53, 54, 255], diff --git a/resources/themes/cura-light/theme.json b/resources/themes/cura-light/theme.json index 05a7109361..716ba6ba8a 100644 --- a/resources/themes/cura-light/theme.json +++ b/resources/themes/cura-light/theme.json @@ -405,7 +405,6 @@ "favorites_row_selected": [196, 239, 255, 255], "monitor_printer_family_tag": [228, 228, 242, 255], - "monitor_text_primary": [65, 64, 84, 255], "monitor_text_disabled": [238, 238, 238, 255], "monitor_icon_primary": [10, 8, 80, 255], "monitor_icon_accent": [255, 255, 255, 255], From ec5796400ba97d8a0a750f2f66be0f8febc4b82b Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Thu, 8 Oct 2020 17:55:11 +0200 Subject: [PATCH 4/6] Remove hardcoded narrow_margins CURA-7745 --- .../resources/qml/MonitorPrinterCard.qml | 8 ++++---- plugins/UM3NetworkPrinting/resources/qml/MonitorQueue.qml | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/plugins/UM3NetworkPrinting/resources/qml/MonitorPrinterCard.qml b/plugins/UM3NetworkPrinting/resources/qml/MonitorPrinterCard.qml index 2e9b3e74fb..cc5e23ec71 100644 --- a/plugins/UM3NetworkPrinting/resources/qml/MonitorPrinterCard.qml +++ b/plugins/UM3NetworkPrinting/resources/qml/MonitorPrinterCard.qml @@ -130,7 +130,7 @@ Item anchors { top: printerNameLabel.bottom - topMargin: 6 * screenScaleFactor // TODO: Theme! + topMargin: UM.Theme.getSize("narrow_margin").height left: printerNameLabel.left } text: printer ? printer.type : "" @@ -140,7 +140,7 @@ Item id: managePrinterLink anchors { top: printerFamilyPill.bottom - topMargin: 6 * screenScaleFactor + topMargin: UM.Theme.getSize("narrow_margin").height } height: 18 * screenScaleFactor // TODO: Theme! width: childrenRect.width @@ -160,7 +160,7 @@ Item anchors { left: managePrinterText.right - leftMargin: 6 * screenScaleFactor + leftMargin: UM.Theme.getSize("narrow_margin").width verticalCenter: managePrinterText.verticalCenter } color: UM.Theme.getColor("text_link") @@ -413,7 +413,7 @@ Item anchors { top: printerJobNameLabel.bottom - topMargin: 6 * screenScaleFactor // TODO: Theme! + topMargin: UM.Theme.getSize("narrow_margin").height left: printerJobNameLabel.left } color: printer && printer.activePrintJob && printer.activePrintJob.isActive ? UM.Theme.getColor("text") : UM.Theme.getColor("monitor_text_disabled") diff --git a/plugins/UM3NetworkPrinting/resources/qml/MonitorQueue.qml b/plugins/UM3NetworkPrinting/resources/qml/MonitorQueue.qml index 0da22ce10e..23add1c41f 100644 --- a/plugins/UM3NetworkPrinting/resources/qml/MonitorQueue.qml +++ b/plugins/UM3NetworkPrinting/resources/qml/MonitorQueue.qml @@ -58,7 +58,7 @@ Item anchors { left: externalLinkIcon.right - leftMargin: 6 * screenScaleFactor // TODO: Theme! + leftMargin: UM.Theme.getSize("narrow_margin").width verticalCenter: externalLinkIcon.verticalCenter } color: UM.Theme.getColor("text_link") @@ -88,7 +88,7 @@ Item anchors { left: queuedPrintJobs.left - leftMargin: 6 * screenScaleFactor // TODO: Theme! + leftMargin: UM.Theme.getSize("narrow_margin").width top: queuedLabel.bottom topMargin: 24 * screenScaleFactor // TODO: Theme! } @@ -99,7 +99,7 @@ Item text: catalog.i18nc("@label", "There are no print jobs in the queue. Slice and send a job to add one.") color: UM.Theme.getColor("text") elide: Text.ElideRight - font: UM.Theme.getFont("medium") // 14pt, regular + font: UM.Theme.getFont("medium") anchors.verticalCenter: parent.verticalCenter // FIXED-LINE-HEIGHT: From 77290451e12d2969d6c731c31311c166f4e0baec Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Thu, 8 Oct 2020 18:00:53 +0200 Subject: [PATCH 5/6] Remove a bunch of unneeded properties from the labels CURA-7745 --- .../resources/qml/MonitorQueue.qml | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/plugins/UM3NetworkPrinting/resources/qml/MonitorQueue.qml b/plugins/UM3NetworkPrinting/resources/qml/MonitorQueue.qml index 23add1c41f..9f159102e2 100644 --- a/plugins/UM3NetworkPrinting/resources/qml/MonitorQueue.qml +++ b/plugins/UM3NetworkPrinting/resources/qml/MonitorQueue.qml @@ -98,13 +98,9 @@ Item { text: catalog.i18nc("@label", "There are no print jobs in the queue. Slice and send a job to add one.") color: UM.Theme.getColor("text") - elide: Text.ElideRight font: UM.Theme.getFont("medium") anchors.verticalCenter: parent.verticalCenter - // FIXED-LINE-HEIGHT: - height: 18 * screenScaleFactor // TODO: Theme! - verticalAlignment: Text.AlignVCenter renderType: Text.NativeRendering visible: printJobList.count === 0 } @@ -113,14 +109,10 @@ Item { text: catalog.i18nc("@label", "Print jobs") color: UM.Theme.getColor("text") - elide: Text.ElideRight font: UM.Theme.getFont("medium") // 14pt, regular anchors.verticalCenter: parent.verticalCenter width: 284 * screenScaleFactor // TODO: Theme! (Should match column size) - // FIXED-LINE-HEIGHT: - height: 18 * screenScaleFactor // TODO: Theme! - verticalAlignment: Text.AlignVCenter renderType: Text.NativeRendering visible: printJobList.count > 0 } @@ -129,14 +121,10 @@ Item { text: catalog.i18nc("@label", "Total print time") color: UM.Theme.getColor("text") - elide: Text.ElideRight font: UM.Theme.getFont("medium") // 14pt, regular anchors.verticalCenter: parent.verticalCenter width: UM.Theme.getSize("monitor_column").width - // FIXED-LINE-HEIGHT: - height: 18 * screenScaleFactor // TODO: Theme! - verticalAlignment: Text.AlignVCenter renderType: Text.NativeRendering visible: printJobList.count > 0 } @@ -145,14 +133,10 @@ Item { text: catalog.i18nc("@label", "Waiting for") color: UM.Theme.getColor("text") - elide: Text.ElideRight font: UM.Theme.getFont("medium") // 14pt, regular anchors.verticalCenter: parent.verticalCenter width: UM.Theme.getSize("monitor_column").width - // FIXED-LINE-HEIGHT: - height: 18 * screenScaleFactor // TODO: Theme! - verticalAlignment: Text.AlignVCenter renderType: Text.NativeRendering visible: printJobList.count > 0 } From 3ad5219f5dc752e96850ad089505ed806632ef5d Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Mon, 12 Oct 2020 11:06:49 +0200 Subject: [PATCH 6/6] Simplify the printer state display CURA-7745 --- .../resources/qml/MonitorPrinterCard.qml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/plugins/UM3NetworkPrinting/resources/qml/MonitorPrinterCard.qml b/plugins/UM3NetworkPrinting/resources/qml/MonitorPrinterCard.qml index cc5e23ec71..daa1eab1c7 100644 --- a/plugins/UM3NetworkPrinting/resources/qml/MonitorPrinterCard.qml +++ b/plugins/UM3NetworkPrinting/resources/qml/MonitorPrinterCard.qml @@ -347,18 +347,23 @@ Item if (!printer) { return catalog.i18nc("@label:status", "Loading...") } - if (printer && printer.state == "disabled") + if (printer.state == "disabled") { return catalog.i18nc("@label:status", "Unavailable") } - if (printer && printer.state == "unreachable") + if (printer.state == "unreachable") { return catalog.i18nc("@label:status", "Unreachable") } - if (printer && !printer.activePrintJob && printer.state == "idle") + if (!printer.activePrintJob && printer.state == "idle") { return catalog.i18nc("@label:status", "Idle") } + if (!printer.activePrintJob && printer.state == "printing") + { + // The print job isn't quite updated yet. + return catalog.i18nc("@label:status", "Printing") + } return "" } visible: text !== ""