From 28324ff2f6b36a26246290db7d1976d53502932e Mon Sep 17 00:00:00 2001 From: Ian Paschal Date: Fri, 7 Sep 2018 15:28:35 +0200 Subject: [PATCH 01/19] Monitor Tab - Font improvements Contributes to CL-1046 --- .../UM3NetworkPrinting/resources/qml/ClusterControlItem.qml | 2 +- .../resources/qml/PrintCoreConfiguration.qml | 2 +- plugins/UM3NetworkPrinting/resources/qml/PrintJobInfoBlock.qml | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/plugins/UM3NetworkPrinting/resources/qml/ClusterControlItem.qml b/plugins/UM3NetworkPrinting/resources/qml/ClusterControlItem.qml index 1164e383db..529566a7eb 100644 --- a/plugins/UM3NetworkPrinting/resources/qml/ClusterControlItem.qml +++ b/plugins/UM3NetworkPrinting/resources/qml/ClusterControlItem.qml @@ -337,7 +337,7 @@ Component { id: printJobName text: modelData.activePrintJob != null ? modelData.activePrintJob.name : "" - font: UM.Theme.getFont("default_bold") + font: UM.Theme.getFont("default") anchors.left: parent.left anchors.right: contextButton.left anchors.rightMargin: UM.Theme.getSize("default_margin").width diff --git a/plugins/UM3NetworkPrinting/resources/qml/PrintCoreConfiguration.qml b/plugins/UM3NetworkPrinting/resources/qml/PrintCoreConfiguration.qml index 0ae1fec920..b2f4e85f9a 100644 --- a/plugins/UM3NetworkPrinting/resources/qml/PrintCoreConfiguration.qml +++ b/plugins/UM3NetworkPrinting/resources/qml/PrintCoreConfiguration.qml @@ -67,7 +67,7 @@ Item } return "" } - font: UM.Theme.getFont("default_bold") + font: UM.Theme.getFont("default") elide: Text.ElideRight width: parent.width } diff --git a/plugins/UM3NetworkPrinting/resources/qml/PrintJobInfoBlock.qml b/plugins/UM3NetworkPrinting/resources/qml/PrintJobInfoBlock.qml index f39b430e19..ee96887969 100644 --- a/plugins/UM3NetworkPrinting/resources/qml/PrintJobInfoBlock.qml +++ b/plugins/UM3NetworkPrinting/resources/qml/PrintJobInfoBlock.qml @@ -62,7 +62,7 @@ Item { id: printJobName text: printJob.name - font: UM.Theme.getFont("default_bold") + font: UM.Theme.getFont("default") width: parent.width elide: Text.ElideRight } @@ -105,7 +105,6 @@ Item Label { id: totalTimeLabel - opacity: 0.6 anchors.bottom: parent.bottom anchors.right: parent.right font: UM.Theme.getFont("default") From 13717d3ce6895f9ceb60c0fe61fb0e2937253261 Mon Sep 17 00:00:00 2001 From: Ian Paschal Date: Fri, 7 Sep 2018 16:05:24 +0200 Subject: [PATCH 02/19] Monitor Tab - Fix -1h -1m bug Contributes to CL-1047 --- .../resources/qml/ClusterControlItem.qml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plugins/UM3NetworkPrinting/resources/qml/ClusterControlItem.qml b/plugins/UM3NetworkPrinting/resources/qml/ClusterControlItem.qml index 529566a7eb..69db8843d1 100644 --- a/plugins/UM3NetworkPrinting/resources/qml/ClusterControlItem.qml +++ b/plugins/UM3NetworkPrinting/resources/qml/ClusterControlItem.qml @@ -668,7 +668,12 @@ Component case "queued": return catalog.i18nc("@label:status", "Action required") default: - OutputDevice.formatDuration(modelData.activePrintJob.timeTotal - modelData.activePrintJob.timeElapsed) + /* Sometimes total minus elapsed is less than 0. Use Math.max() to prevent + remaining time from ever being less than 0. Negative durations cause + strange behavior such as displaying "-1h -1m". */ + var activeJob = modelData.activePrintJob + var remaining = activeJob.timeTotal - activeJob.timeElapsed; + OutputDevice.formatDuration(Math.max(remaining, 0)) } } From 90e8c41fa2976ae17c4dc9836ffc63dfacd44ef8 Mon Sep 17 00:00:00 2001 From: Ian Paschal Date: Fri, 7 Sep 2018 16:09:25 +0200 Subject: [PATCH 03/19] Show time remaining instead of "Paused" Contributes to CL-1047 --- .../resources/qml/ClusterControlItem.qml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/plugins/UM3NetworkPrinting/resources/qml/ClusterControlItem.qml b/plugins/UM3NetworkPrinting/resources/qml/ClusterControlItem.qml index 69db8843d1..d6c7dd7a8b 100644 --- a/plugins/UM3NetworkPrinting/resources/qml/ClusterControlItem.qml +++ b/plugins/UM3NetworkPrinting/resources/qml/ClusterControlItem.qml @@ -645,6 +645,12 @@ Component return "" } + /* Sometimes total minus elapsed is less than 0. Use Math.max() to prevent remaining + time from ever being less than 0. Negative durations cause strange behavior such + as displaying "-1h -1m". */ + var activeJob = modelData.activePrintJob + var remainingTime = Math.max(activeJob.timeTotal - activeJob.timeElapsed, 0); + switch(modelData.activePrintJob.state) { case "wait_cleanup": @@ -662,18 +668,13 @@ Component case "pausing": return catalog.i18nc("@label:status", "Pausing") case "paused": - return catalog.i18nc("@label:status", "Paused") + return OutputDevice.formatDuration( remainingTime ) case "resuming": return catalog.i18nc("@label:status", "Resuming") case "queued": return catalog.i18nc("@label:status", "Action required") default: - /* Sometimes total minus elapsed is less than 0. Use Math.max() to prevent - remaining time from ever being less than 0. Negative durations cause - strange behavior such as displaying "-1h -1m". */ - var activeJob = modelData.activePrintJob - var remaining = activeJob.timeTotal - activeJob.timeElapsed; - OutputDevice.formatDuration(Math.max(remaining, 0)) + return OutputDevice.formatDuration( remainingTime ) } } From 97e8db577aed4813c973df47750ff08e5c333d0b Mon Sep 17 00:00:00 2001 From: Ian Paschal Date: Fri, 7 Sep 2018 16:45:30 +0200 Subject: [PATCH 04/19] Monitor Tab - Add grey monitor tab text Contributes to CL-1047 --- .../UM3NetworkPrinting/resources/qml/ClusterControlItem.qml | 2 +- resources/themes/cura-light/theme.json | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/plugins/UM3NetworkPrinting/resources/qml/ClusterControlItem.qml b/plugins/UM3NetworkPrinting/resources/qml/ClusterControlItem.qml index d6c7dd7a8b..90ceb1ed6e 100644 --- a/plugins/UM3NetworkPrinting/resources/qml/ClusterControlItem.qml +++ b/plugins/UM3NetworkPrinting/resources/qml/ClusterControlItem.qml @@ -223,7 +223,7 @@ Component width: parent.width elide: Text.ElideRight font: UM.Theme.getFont("default") - opacity: 0.6 + color: UM.Theme.getColor("monitor_secondary_text") } } diff --git a/resources/themes/cura-light/theme.json b/resources/themes/cura-light/theme.json index c408146669..c70aa512cf 100644 --- a/resources/themes/cura-light/theme.json +++ b/resources/themes/cura-light/theme.json @@ -321,7 +321,9 @@ "favorites_header_hover": [245, 245, 245, 255], "favorites_header_text": [31, 36, 39, 255], "favorites_header_text_hover": [31, 36, 39, 255], - "favorites_row_selected": [196, 239, 255, 255] + "favorites_row_selected": [196, 239, 255, 255], + + "monitor_secondary_text": [153, 153, 153, 255] }, "sizes": { From 79aeca9663fae958b2a28ad79f905bfa88aadd8e Mon Sep 17 00:00:00 2001 From: Ian Paschal Date: Fri, 7 Sep 2018 16:46:11 +0200 Subject: [PATCH 05/19] Monitor Tab - Grey progress bar for pause/abort Contributes to CL-1047 --- .../resources/qml/ClusterControlItem.qml | 39 +++++++++++++++---- 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/plugins/UM3NetworkPrinting/resources/qml/ClusterControlItem.qml b/plugins/UM3NetworkPrinting/resources/qml/ClusterControlItem.qml index 90ceb1ed6e..9d6c31a73f 100644 --- a/plugins/UM3NetworkPrinting/resources/qml/ClusterControlItem.qml +++ b/plugins/UM3NetworkPrinting/resources/qml/ClusterControlItem.qml @@ -638,19 +638,24 @@ Component style: ProgressBarStyle { + property var remainingTime: + { + if(modelData.activePrintJob == null) + { + return 0 + } + /* Sometimes total minus elapsed is less than 0. Use Math.max() to prevent remaining + time from ever being less than 0. Negative durations cause strange behavior such + as displaying "-1h -1m". */ + var activeJob = modelData.activePrintJob + return Math.max(activeJob.timeTotal - activeJob.timeElapsed, 0); + } property var progressText: { if(modelData.activePrintJob == null) { return "" } - - /* Sometimes total minus elapsed is less than 0. Use Math.max() to prevent remaining - time from ever being less than 0. Negative durations cause strange behavior such - as displaying "-1h -1m". */ - var activeJob = modelData.activePrintJob - var remainingTime = Math.max(activeJob.timeTotal - activeJob.timeElapsed, 0); - switch(modelData.activePrintJob.state) { case "wait_cleanup": @@ -663,6 +668,7 @@ Component case "sent_to_printer": return catalog.i18nc("@label:status", "Preparing") case "aborted": + return catalog.i18nc("@label:status", "Aborted") case "wait_user_action": return catalog.i18nc("@label:status", "Aborted") case "pausing": @@ -687,7 +693,24 @@ Component progress: Rectangle { - color: UM.Theme.getColor("primary") + color: + { + var state = modelData.activePrintJob.state + var deactiveStates = [ + "pausing", + "paused", + "resuming", + "wait_cleanup" + ] + if(deactiveStates.indexOf(state) > -1 && remainingTime > 0) + { + return UM.Theme.getColor("monitor_secondary_text") + } + else + { + return UM.Theme.getColor("primary") + } + } id: progressItem function getTextOffset() { From 90426749a294382a7b6899b3e28a7e65b238d4c5 Mon Sep 17 00:00:00 2001 From: Ian Paschal Date: Mon, 10 Sep 2018 11:35:58 +0200 Subject: [PATCH 06/19] Change deactiveStates to inactiveStates Contributes to CL-1047 --- .../UM3NetworkPrinting/resources/qml/ClusterControlItem.qml | 4 ++-- .../UM3NetworkPrinting/resources/qml/PrintJobInfoBlock.qml | 2 +- resources/themes/cura-light/theme.json | 4 +++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/plugins/UM3NetworkPrinting/resources/qml/ClusterControlItem.qml b/plugins/UM3NetworkPrinting/resources/qml/ClusterControlItem.qml index 9d6c31a73f..aee374c95c 100644 --- a/plugins/UM3NetworkPrinting/resources/qml/ClusterControlItem.qml +++ b/plugins/UM3NetworkPrinting/resources/qml/ClusterControlItem.qml @@ -696,13 +696,13 @@ Component color: { var state = modelData.activePrintJob.state - var deactiveStates = [ + var inactiveStates = [ "pausing", "paused", "resuming", "wait_cleanup" ] - if(deactiveStates.indexOf(state) > -1 && remainingTime > 0) + if(inactiveStates.indexOf(state) > -1 && remainingTime > 0) { return UM.Theme.getColor("monitor_secondary_text") } diff --git a/plugins/UM3NetworkPrinting/resources/qml/PrintJobInfoBlock.qml b/plugins/UM3NetworkPrinting/resources/qml/PrintJobInfoBlock.qml index ee96887969..3e36ec6534 100644 --- a/plugins/UM3NetworkPrinting/resources/qml/PrintJobInfoBlock.qml +++ b/plugins/UM3NetworkPrinting/resources/qml/PrintJobInfoBlock.qml @@ -10,7 +10,7 @@ Item { id: base property var printJob: null - property var shadowRadius: 5 + property var shadowRadius: 5 * screenScaleFactor function getPrettyTime(time) { return OutputDevice.formatDuration(time) diff --git a/resources/themes/cura-light/theme.json b/resources/themes/cura-light/theme.json index c70aa512cf..61f60e034c 100644 --- a/resources/themes/cura-light/theme.json +++ b/resources/themes/cura-light/theme.json @@ -471,6 +471,8 @@ "toolbox_progress_bar": [8.0, 0.5], "toolbox_chart_row": [1.0, 2.0], "toolbox_action_button": [8.0, 2.5], - "toolbox_loader": [2.0, 2.0] + "toolbox_loader": [2.0, 2.0], + + "drop_shadow_radius": [1.0, 1.0] } } From 0d67420601b93d1eb32e075e7509e6bf281c930e Mon Sep 17 00:00:00 2001 From: Ian Paschal Date: Mon, 10 Sep 2018 13:38:26 +0200 Subject: [PATCH 07/19] Monitor Tab - Accordion-style printer blocks Includes some unsuccessful attempts at scaling the outer-shadow Contributes to CL-1048 --- .../resources/qml/ClusterControlItem.qml | 26 ++++++++++++++++--- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/plugins/UM3NetworkPrinting/resources/qml/ClusterControlItem.qml b/plugins/UM3NetworkPrinting/resources/qml/ClusterControlItem.qml index aee374c95c..4e5b875457 100644 --- a/plugins/UM3NetworkPrinting/resources/qml/ClusterControlItem.qml +++ b/plugins/UM3NetworkPrinting/resources/qml/ClusterControlItem.qml @@ -15,7 +15,7 @@ Component { id: base property var lineColor: "#DCDCDC" // TODO: Should be linked to theme. - + property var shadowRadius: 5 * screenScaleFactor property var cornerRadius: 4 * screenScaleFactor // TODO: Should be linked to theme. visible: OutputDevice != null anchors.fill: parent @@ -82,6 +82,8 @@ Component ListView { + id: printer_list + property var current_index: -1 anchors { top: parent.top @@ -105,17 +107,23 @@ Component anchors.horizontalCenter: parent.horizontalCenter anchors.verticalCenter: parent.verticalCenter id: base - property var shadowRadius: 5 + property var shadowRadius: 5 * screenScaleFactor property var collapsed: true layer.enabled: true layer.effect: DropShadow { - radius: base.shadowRadius + radius: 5 * screenScaleFactor verticalOffset: 2 color: "#3F000000" // 25% shadow } + Connections + { + target: printer_list + onCurrent_indexChanged: { base.collapsed = printer_list.current_index != model.index } + } + Item { id: printerInfo @@ -131,7 +139,17 @@ Component MouseArea { anchors.fill: parent - onClicked: base.collapsed = !base.collapsed + onClicked: + { + + if (base.collapsed) { + printer_list.current_index = model.index + } + else + { + printer_list.current_index = -1 + } + } } Item From 1c8b086403a345a71c6dd0d07e596c76f51ed480 Mon Sep 17 00:00:00 2001 From: Ian Paschal Date: Mon, 10 Sep 2018 14:35:05 +0200 Subject: [PATCH 08/19] Improve inactive coloring Contributes to CL-1048 --- .../resources/qml/ClusterControlItem.qml | 61 ++++++++++++++++--- resources/themes/cura-light/theme.json | 5 +- 2 files changed, 56 insertions(+), 10 deletions(-) diff --git a/plugins/UM3NetworkPrinting/resources/qml/ClusterControlItem.qml b/plugins/UM3NetworkPrinting/resources/qml/ClusterControlItem.qml index 4e5b875457..93c29708b2 100644 --- a/plugins/UM3NetworkPrinting/resources/qml/ClusterControlItem.qml +++ b/plugins/UM3NetworkPrinting/resources/qml/ClusterControlItem.qml @@ -106,6 +106,17 @@ Component height: childrenRect.height + UM.Theme.getSize("default_margin").height anchors.horizontalCenter: parent.horizontalCenter anchors.verticalCenter: parent.verticalCenter + color: + { + if(modelData.state == "disabled") + { + return UM.Theme.getColor("monitor_background_inactive") + } + else + { + return UM.Theme.getColor("monitor_background_active") + } + } id: base property var shadowRadius: 5 * screenScaleFactor property var collapsed: true @@ -141,7 +152,6 @@ Component anchors.fill: parent onClicked: { - if (base.collapsed) { printer_list.current_index = model.index } @@ -185,7 +195,7 @@ Component { if(modelData.state == "disabled") { - return UM.Theme.getColor("setting_control_disabled") + return UM.Theme.getColor("monitor_text_inactive") } if(modelData.activePrintJob != undefined) @@ -193,7 +203,7 @@ Component return UM.Theme.getColor("primary") } - return UM.Theme.getColor("setting_control_disabled") + return UM.Theme.getColor("monitor_text_inactive") } } } @@ -241,7 +251,7 @@ Component width: parent.width elide: Text.ElideRight font: UM.Theme.getFont("default") - color: UM.Theme.getColor("monitor_secondary_text") + color: UM.Theme.getColor("monitor_text_inactive") } } @@ -274,8 +284,16 @@ Component Rectangle { id: topSpacer - color: UM.Theme.getColor("viewport_background") - height: 2 + color: + { + if(modelData.state == "disabled") + { + return UM.Theme.getColor("monitor_lining_inactive") + } + return UM.Theme.getColor("viewport_background") + } + // UM.Theme.getColor("viewport_background") + height: 1 anchors { left: parent.left @@ -288,7 +306,14 @@ Component PrinterFamilyPill { id: printerFamilyPill - color: UM.Theme.getColor("viewport_background") + color: + { + if(modelData.state == "disabled") + { + return "transparent" + } + return UM.Theme.getColor("viewport_background") + } anchors.top: topSpacer.bottom anchors.topMargin: 2 * UM.Theme.getSize("default_margin").height text: modelData.type @@ -722,7 +747,7 @@ Component ] if(inactiveStates.indexOf(state) > -1 && remainingTime > 0) { - return UM.Theme.getColor("monitor_secondary_text") + return UM.Theme.getColor("monitor_background_inactive") } else { @@ -749,7 +774,25 @@ Component anchors.leftMargin: getTextOffset() text: progressText anchors.verticalCenter: parent.verticalCenter - color: progressItem.width + progressLabel.width < control.width ? "black" : "white" + // color: progressItem.width + progressLabel.width < control.width ? "black" : "white" + color: + { + var state = modelData.activePrintJob.state + var inactiveStates = [ + "pausing", + "paused", + "resuming", + "wait_cleanup" + ] + if(inactiveStates.indexOf(state) > -1 && remainingTime > 0) + { + return "black" + } + else + { + return progressItem.width + progressLabel.width < control.width ? "black" : "white" + } + } width: contentWidth font: UM.Theme.getFont("default") } diff --git a/resources/themes/cura-light/theme.json b/resources/themes/cura-light/theme.json index 61f60e034c..43d892c34c 100644 --- a/resources/themes/cura-light/theme.json +++ b/resources/themes/cura-light/theme.json @@ -323,7 +323,10 @@ "favorites_header_text_hover": [31, 36, 39, 255], "favorites_row_selected": [196, 239, 255, 255], - "monitor_secondary_text": [153, 153, 153, 255] + "monitor_text_inactive": [154, 154, 154, 255], + "monitor_background_inactive": [240, 240, 240, 255], + "monitor_background_active": [255, 255, 255, 255], + "monitor_lining_inactive": [230, 230, 230, 255] }, "sizes": { From 333cea4e6d8f13f6af25c8c7a464afe04ccba5d4 Mon Sep 17 00:00:00 2001 From: Ian Paschal Date: Mon, 10 Sep 2018 15:06:19 +0200 Subject: [PATCH 09/19] Some tweaks were not really improvements Contributes to CL-1048 --- .../resources/qml/ClusterControlItem.qml | 23 +++---------------- 1 file changed, 3 insertions(+), 20 deletions(-) diff --git a/plugins/UM3NetworkPrinting/resources/qml/ClusterControlItem.qml b/plugins/UM3NetworkPrinting/resources/qml/ClusterControlItem.qml index 93c29708b2..889235c023 100644 --- a/plugins/UM3NetworkPrinting/resources/qml/ClusterControlItem.qml +++ b/plugins/UM3NetworkPrinting/resources/qml/ClusterControlItem.qml @@ -747,7 +747,7 @@ Component ] if(inactiveStates.indexOf(state) > -1 && remainingTime > 0) { - return UM.Theme.getColor("monitor_background_inactive") + return UM.Theme.getColor("monitor_text_inactive") } else { @@ -757,7 +757,7 @@ Component id: progressItem function getTextOffset() { - if(progressItem.width + progressLabel.width < control.width) + if(progressItem.width + progressLabel.width + 16 < control.width) { return progressItem.width + UM.Theme.getSize("default_margin").width } @@ -774,24 +774,7 @@ Component anchors.leftMargin: getTextOffset() text: progressText anchors.verticalCenter: parent.verticalCenter - // color: progressItem.width + progressLabel.width < control.width ? "black" : "white" - color: - { - var state = modelData.activePrintJob.state - var inactiveStates = [ - "pausing", - "paused", - "resuming", - "wait_cleanup" - ] - if(inactiveStates.indexOf(state) > -1 && remainingTime > 0) - { - return "black" - } - else - { - return progressItem.width + progressLabel.width < control.width ? "black" : "white" - } + color: progressItem.width + progressLabel.width < control.width ? "black" : "white" } width: contentWidth font: UM.Theme.getFont("default") From ac5a038065caa19b06ba3fc17222599a99a85608 Mon Sep 17 00:00:00 2001 From: Ian Paschal Date: Tue, 11 Sep 2018 10:27:50 +0200 Subject: [PATCH 10/19] Monitor Tab - Fix syntax error Contributes to CL-1048 --- plugins/UM3NetworkPrinting/resources/qml/ClusterControlItem.qml | 1 - 1 file changed, 1 deletion(-) diff --git a/plugins/UM3NetworkPrinting/resources/qml/ClusterControlItem.qml b/plugins/UM3NetworkPrinting/resources/qml/ClusterControlItem.qml index 889235c023..2f65983ac4 100644 --- a/plugins/UM3NetworkPrinting/resources/qml/ClusterControlItem.qml +++ b/plugins/UM3NetworkPrinting/resources/qml/ClusterControlItem.qml @@ -775,7 +775,6 @@ Component text: progressText anchors.verticalCenter: parent.verticalCenter color: progressItem.width + progressLabel.width < control.width ? "black" : "white" - } width: contentWidth font: UM.Theme.getFont("default") } From e7704ede3c8c10562ddd9303a5768cce8a1f023c Mon Sep 17 00:00:00 2001 From: Ian Paschal Date: Tue, 11 Sep 2018 17:01:26 +0200 Subject: [PATCH 11/19] Monitor Tab - Fix queue/manage queue alignment Contributes to CL-1052 --- .../UM3NetworkPrinting/resources/qml/ClusterMonitorItem.qml | 2 +- .../UM3NetworkPrinting/resources/qml/PrintJobInfoBlock.qml | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/plugins/UM3NetworkPrinting/resources/qml/ClusterMonitorItem.qml b/plugins/UM3NetworkPrinting/resources/qml/ClusterMonitorItem.qml index 71b598d05c..3832d6eace 100644 --- a/plugins/UM3NetworkPrinting/resources/qml/ClusterMonitorItem.qml +++ b/plugins/UM3NetworkPrinting/resources/qml/ClusterMonitorItem.qml @@ -26,7 +26,7 @@ Component Label { id: manageQueueLabel - anchors.rightMargin: 4 * UM.Theme.getSize("default_margin").width + anchors.rightMargin: 3 * UM.Theme.getSize("default_margin").width anchors.right: queuedPrintJobs.right anchors.bottom: queuedLabel.bottom text: catalog.i18nc("@label link to connect manager", "Manage queue") diff --git a/plugins/UM3NetworkPrinting/resources/qml/PrintJobInfoBlock.qml b/plugins/UM3NetworkPrinting/resources/qml/PrintJobInfoBlock.qml index 3e36ec6534..58be8c1638 100644 --- a/plugins/UM3NetworkPrinting/resources/qml/PrintJobInfoBlock.qml +++ b/plugins/UM3NetworkPrinting/resources/qml/PrintJobInfoBlock.qml @@ -16,6 +16,8 @@ Item return OutputDevice.formatDuration(time) } + width: parent.width + UM.I18nCatalog { id: catalog @@ -54,7 +56,7 @@ Item bottom: parent.bottom left: parent.left right: parent.horizontalCenter - margins: 2 * UM.Theme.getSize("default_margin").width + margins: UM.Theme.getSize("wide_margin").width rightMargin: UM.Theme.getSize("default_margin").width } @@ -124,6 +126,7 @@ Item right: parent.right margins: 2 * UM.Theme.getSize("default_margin").width leftMargin: UM.Theme.getSize("default_margin").width + rightMargin: UM.Theme.getSize("default_margin").width } Label From e51089a88039498f390c506f0ecb64533a55a764 Mon Sep 17 00:00:00 2001 From: Ian Paschal Date: Wed, 12 Sep 2018 13:03:12 +0200 Subject: [PATCH 12/19] Mointor Tab - CL-1046 Make fonts bold --- plugins/UM3NetworkPrinting/resources/qml/ClusterControlItem.qml | 2 +- plugins/UM3NetworkPrinting/resources/qml/PrintJobInfoBlock.qml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/UM3NetworkPrinting/resources/qml/ClusterControlItem.qml b/plugins/UM3NetworkPrinting/resources/qml/ClusterControlItem.qml index 2f65983ac4..a5145cc201 100644 --- a/plugins/UM3NetworkPrinting/resources/qml/ClusterControlItem.qml +++ b/plugins/UM3NetworkPrinting/resources/qml/ClusterControlItem.qml @@ -380,7 +380,7 @@ Component { id: printJobName text: modelData.activePrintJob != null ? modelData.activePrintJob.name : "" - font: UM.Theme.getFont("default") + font: UM.Theme.getFont("default_bold") anchors.left: parent.left anchors.right: contextButton.left anchors.rightMargin: UM.Theme.getSize("default_margin").width diff --git a/plugins/UM3NetworkPrinting/resources/qml/PrintJobInfoBlock.qml b/plugins/UM3NetworkPrinting/resources/qml/PrintJobInfoBlock.qml index 58be8c1638..005c274a29 100644 --- a/plugins/UM3NetworkPrinting/resources/qml/PrintJobInfoBlock.qml +++ b/plugins/UM3NetworkPrinting/resources/qml/PrintJobInfoBlock.qml @@ -64,7 +64,7 @@ Item { id: printJobName text: printJob.name - font: UM.Theme.getFont("default") + font: UM.Theme.getFont("default_bold") width: parent.width elide: Text.ElideRight } From 0a01e7c25b6ca470396452cf5a25cf177d899537 Mon Sep 17 00:00:00 2001 From: Ian Paschal Date: Wed, 12 Sep 2018 16:31:59 +0200 Subject: [PATCH 13/19] Monitor Tab - Improved camera icon - Fixed: Camera icon is too small, and the icon does not look centred - Fixed: No hover effect for the camera button Contributes to CL-1049 --- .../resources/qml/ClusterControlItem.qml | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/plugins/UM3NetworkPrinting/resources/qml/ClusterControlItem.qml b/plugins/UM3NetworkPrinting/resources/qml/ClusterControlItem.qml index a5145cc201..8ad6e5ea87 100644 --- a/plugins/UM3NetworkPrinting/resources/qml/ClusterControlItem.qml +++ b/plugins/UM3NetworkPrinting/resources/qml/ClusterControlItem.qml @@ -628,24 +628,28 @@ Component Rectangle { - id: showCameraIcon - width: 35 * screenScaleFactor + id: showCameraButton + width: 36 * screenScaleFactor height: width radius: 0.5 * width anchors.left: parent.left anchors.bottom: printJobPreview.bottom - color: UM.Theme.getColor("setting_control_border_highlight") - Image + color: showCameraMouseArea.containsMouse ? UM.Theme.getColor("primary_hover") : UM.Theme.getColor("primary") + UM.RecolorImage { - width: parent.width + id: showCameraIcon + width: parent.width - 1 height: width - anchors.right: parent.right - anchors.rightMargin: parent.rightMargin + anchors.verticalCenter: parent.verticalCenter + anchors.horizontalCenter: parent.horizontalCenter + color: UM.Theme.getColor("primary_text") source: "../svg/camera-icon.svg" } MouseArea { + id: showCameraMouseArea anchors.fill:parent + hoverEnabled: true onClicked: { OutputDevice.setActiveCamera(modelData.camera) From dccc95f81716dac465695cc4dd997136f250199a Mon Sep 17 00:00:00 2001 From: Ian Paschal Date: Wed, 12 Sep 2018 16:46:18 +0200 Subject: [PATCH 14/19] Monitor Tab - Camera button toggles Contributes to CL-1049 --- .../resources/qml/ClusterControlItem.qml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/plugins/UM3NetworkPrinting/resources/qml/ClusterControlItem.qml b/plugins/UM3NetworkPrinting/resources/qml/ClusterControlItem.qml index 8ad6e5ea87..79c64defd6 100644 --- a/plugins/UM3NetworkPrinting/resources/qml/ClusterControlItem.qml +++ b/plugins/UM3NetworkPrinting/resources/qml/ClusterControlItem.qml @@ -652,7 +652,14 @@ Component hoverEnabled: true onClicked: { - OutputDevice.setActiveCamera(modelData.camera) + if (OutputDevice.activeCamera !== null) + { + OutputDevice.setActiveCamera(null) + } + else + { + OutputDevice.setActiveCamera(modelData.camera) + } } } } From 08d5e48407a39555fc138a2d1a3105f6ce1d2e4e Mon Sep 17 00:00:00 2001 From: Ian Paschal Date: Wed, 12 Sep 2018 16:52:26 +0200 Subject: [PATCH 15/19] Monitor Tab - Create reusable button Contributes to CL-1049 --- .../resources/qml/ClusterControlItem.qml | 37 ++------------- .../resources/qml/DotButton.qml | 47 +++++++++++++++++++ 2 files changed, 52 insertions(+), 32 deletions(-) create mode 100644 plugins/UM3NetworkPrinting/resources/qml/DotButton.qml diff --git a/plugins/UM3NetworkPrinting/resources/qml/ClusterControlItem.qml b/plugins/UM3NetworkPrinting/resources/qml/ClusterControlItem.qml index 79c64defd6..c9fc0bc46c 100644 --- a/plugins/UM3NetworkPrinting/resources/qml/ClusterControlItem.qml +++ b/plugins/UM3NetworkPrinting/resources/qml/ClusterControlItem.qml @@ -626,41 +626,14 @@ Component color: "black" } - Rectangle + DotButton { id: showCameraButton - width: 36 * screenScaleFactor - height: width - radius: 0.5 * width - anchors.left: parent.left - anchors.bottom: printJobPreview.bottom - color: showCameraMouseArea.containsMouse ? UM.Theme.getColor("primary_hover") : UM.Theme.getColor("primary") - UM.RecolorImage + iconSource: "../svg/camera-icon.svg" + anchors { - id: showCameraIcon - width: parent.width - 1 - height: width - anchors.verticalCenter: parent.verticalCenter - anchors.horizontalCenter: parent.horizontalCenter - color: UM.Theme.getColor("primary_text") - source: "../svg/camera-icon.svg" - } - MouseArea - { - id: showCameraMouseArea - anchors.fill:parent - hoverEnabled: true - onClicked: - { - if (OutputDevice.activeCamera !== null) - { - OutputDevice.setActiveCamera(null) - } - else - { - OutputDevice.setActiveCamera(modelData.camera) - } - } + left: parent.left + bottom: printJobPreview.bottom } } } diff --git a/plugins/UM3NetworkPrinting/resources/qml/DotButton.qml b/plugins/UM3NetworkPrinting/resources/qml/DotButton.qml new file mode 100644 index 0000000000..e36634fc5c --- /dev/null +++ b/plugins/UM3NetworkPrinting/resources/qml/DotButton.qml @@ -0,0 +1,47 @@ +import QtQuick 2.3 +import QtQuick.Controls 1.4 +import QtQuick.Controls.Styles 1.3 +import QtQuick.Controls 2.0 as Controls2 +import QtGraphicalEffects 1.0 + +import UM 1.3 as UM +import Cura 1.0 as Cura + +Rectangle +{ + property var iconSource: null + + width: 36 * screenScaleFactor + height: width + radius: 0.5 * width + color: clickArea.containsMouse ? UM.Theme.getColor("primary_hover") : UM.Theme.getColor("primary") + + UM.RecolorImage + { + id: icon + width: parent.width - 1 + height: width + anchors.verticalCenter: parent.verticalCenter + anchors.horizontalCenter: parent.horizontalCenter + color: UM.Theme.getColor("primary_text") + source: iconSource + } + + MouseArea + { + id: clickArea + anchors.fill:parent + hoverEnabled: true + onClicked: + { + if (OutputDevice.activeCamera !== null) + { + OutputDevice.setActiveCamera(null) + } + else + { + OutputDevice.setActiveCamera(modelData.camera) + } + } + } +} \ No newline at end of file From 0b66bf0448ae7edda6d82a435e90f528c4a9d87b Mon Sep 17 00:00:00 2001 From: Ian Paschal Date: Wed, 12 Sep 2018 17:07:10 +0200 Subject: [PATCH 16/19] Monitor Tab - Use camera button on camera stream - Fixes: Video feed close button is always out of sight - Makes improvement to camera icon Contributes to CL-1049 --- .../qml/{DotButton.qml => CameraButton.qml} | 2 +- .../resources/qml/ClusterControlItem.qml | 2 +- .../resources/qml/PrinterVideoStream.qml | 66 +++++++++++-------- .../resources/svg/camera-icon.svg | 10 +-- 4 files changed, 47 insertions(+), 33 deletions(-) rename plugins/UM3NetworkPrinting/resources/qml/{DotButton.qml => CameraButton.qml} (97%) diff --git a/plugins/UM3NetworkPrinting/resources/qml/DotButton.qml b/plugins/UM3NetworkPrinting/resources/qml/CameraButton.qml similarity index 97% rename from plugins/UM3NetworkPrinting/resources/qml/DotButton.qml rename to plugins/UM3NetworkPrinting/resources/qml/CameraButton.qml index e36634fc5c..1ceebccf89 100644 --- a/plugins/UM3NetworkPrinting/resources/qml/DotButton.qml +++ b/plugins/UM3NetworkPrinting/resources/qml/CameraButton.qml @@ -19,7 +19,7 @@ Rectangle UM.RecolorImage { id: icon - width: parent.width - 1 + width: parent.width / 2 height: width anchors.verticalCenter: parent.verticalCenter anchors.horizontalCenter: parent.horizontalCenter diff --git a/plugins/UM3NetworkPrinting/resources/qml/ClusterControlItem.qml b/plugins/UM3NetworkPrinting/resources/qml/ClusterControlItem.qml index c9fc0bc46c..52fe0f544a 100644 --- a/plugins/UM3NetworkPrinting/resources/qml/ClusterControlItem.qml +++ b/plugins/UM3NetworkPrinting/resources/qml/ClusterControlItem.qml @@ -626,7 +626,7 @@ Component color: "black" } - DotButton + CameraButton { id: showCameraButton iconSource: "../svg/camera-icon.svg" diff --git a/plugins/UM3NetworkPrinting/resources/qml/PrinterVideoStream.qml b/plugins/UM3NetworkPrinting/resources/qml/PrinterVideoStream.qml index 74c8ec8483..c193d0ed71 100644 --- a/plugins/UM3NetworkPrinting/resources/qml/PrinterVideoStream.qml +++ b/plugins/UM3NetworkPrinting/resources/qml/PrinterVideoStream.qml @@ -23,38 +23,50 @@ Item z: 0 } - Button + CameraButton { - id: backButton - anchors.bottom: cameraImage.top - anchors.bottomMargin: UM.Theme.getSize("default_margin").width - anchors.right: cameraImage.right - - // TODO: Hardcoded sizes - width: 20 * screenScaleFactor - height: 20 * screenScaleFactor - - onClicked: OutputDevice.setActiveCamera(null) - - style: ButtonStyle + id: closeCameraButton + iconSource: UM.Theme.getIcon("cross1") + anchors { - label: Item - { - UM.RecolorImage - { - anchors.verticalCenter: parent.verticalCenter - anchors.horizontalCenter: parent.horizontalCenter - width: control.width - height: control.height - sourceSize.width: width - sourceSize.height: width - source: UM.Theme.getIcon("cross1") - } - } - background: Item {} + top: cameraImage.top + topMargin: UM.Theme.getSize("default_margin").height + right: cameraImage.right + rightMargin: UM.Theme.getSize("default_margin").width } + z: 999 } + // Button + // { + // id: backButton + + + // // TODO: Hardcoded sizes + // width: 20 * screenScaleFactor + // height: 20 * screenScaleFactor + + // onClicked: OutputDevice.setActiveCamera(null) + + // style: ButtonStyle + // { + // label: Item + // { + // UM.RecolorImage + // { + // anchors.verticalCenter: parent.verticalCenter + // anchors.horizontalCenter: parent.horizontalCenter + // width: control.width + // height: control.height + // sourceSize.width: width + // sourceSize.height: width + // source: UM.Theme.getIcon("cross1") + // } + // } + // background: Item {} + // } + // } + Image { id: cameraImage diff --git a/plugins/UM3NetworkPrinting/resources/svg/camera-icon.svg b/plugins/UM3NetworkPrinting/resources/svg/camera-icon.svg index 29adfa5875..66bed04508 100644 --- a/plugins/UM3NetworkPrinting/resources/svg/camera-icon.svg +++ b/plugins/UM3NetworkPrinting/resources/svg/camera-icon.svg @@ -1,6 +1,8 @@ - - - - + + + Created with Sketch. + + + \ No newline at end of file From 7226bc45b519c022a9e703a180c1500e1938bee0 Mon Sep 17 00:00:00 2001 From: Ian Paschal Date: Thu, 13 Sep 2018 10:35:31 +0200 Subject: [PATCH 17/19] Monitor Tab - Queued header is properly aligned Contributes to CL-1052 --- plugins/UM3NetworkPrinting/resources/qml/ClusterMonitorItem.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/UM3NetworkPrinting/resources/qml/ClusterMonitorItem.qml b/plugins/UM3NetworkPrinting/resources/qml/ClusterMonitorItem.qml index 3832d6eace..f6cf6607c7 100644 --- a/plugins/UM3NetworkPrinting/resources/qml/ClusterMonitorItem.qml +++ b/plugins/UM3NetworkPrinting/resources/qml/ClusterMonitorItem.qml @@ -50,7 +50,7 @@ Component anchors.left: queuedPrintJobs.left anchors.top: parent.top anchors.topMargin: 2 * UM.Theme.getSize("default_margin").height - anchors.leftMargin: 3 * UM.Theme.getSize("default_margin").width + anchors.leftMargin: 3 * UM.Theme.getSize("default_margin").width + 5 text: catalog.i18nc("@label", "Queued") font: UM.Theme.getFont("large") color: UM.Theme.getColor("text") From f93413d3a3ab080a40a82ca743202789b943dd46 Mon Sep 17 00:00:00 2001 From: Ian Paschal Date: Thu, 13 Sep 2018 14:52:52 +0200 Subject: [PATCH 18/19] Monitor Tab - Context menu improvements Fixed: - In the Queued jobs area, the context menu doesn't close when clicking on the right half of the card. - Context menu trigger button should be more in the corner for both the print job tiles and the printer tiles - Context menu text should not be centered - Context menu should be closer to the context menu trigger button - Context menu should be aligned further right in relation to the context menu trigger button - Context menu options that are not available should not be shown. - Context button dots should be grey. Contributes to CL-1050 --- .../resources/qml/ClusterControlItem.qml | 67 +++++++++++------- .../resources/qml/PrintJobInfoBlock.qml | 70 +++++++++++++------ 2 files changed, 91 insertions(+), 46 deletions(-) diff --git a/plugins/UM3NetworkPrinting/resources/qml/ClusterControlItem.qml b/plugins/UM3NetworkPrinting/resources/qml/ClusterControlItem.qml index 52fe0f544a..76aff7103a 100644 --- a/plugins/UM3NetworkPrinting/resources/qml/ClusterControlItem.qml +++ b/plugins/UM3NetworkPrinting/resources/qml/ClusterControlItem.qml @@ -399,21 +399,13 @@ Component function switchPopupState() { - if (popup.visible) - { - popup.close() - } - else - { - popup.open() - } + popup.visible ? popup.close() : popup.open() } Controls2.Button { id: contextButton text: "\u22EE" //Unicode; Three stacked points. - font.pixelSize: 25 width: 35 height: width anchors @@ -431,6 +423,14 @@ Component radius: 0.5 * width color: UM.Theme.getColor("viewport_background") } + contentItem: Label + { + text: contextButton.text + color: UM.Theme.getColor("monitor_text_inactive") + font.pixelSize: 25 + verticalAlignment: Text.AlignVCenter + horizontalAlignment: Text.AlignHCenter + } onClicked: parent.switchPopupState() } @@ -440,18 +440,21 @@ Component // TODO Change once updating to Qt5.10 - The 'opened' property is in 5.10 but the behavior is now implemented with the visible property id: popup clip: true - closePolicy: Controls2.Popup.CloseOnPressOutsideParent - x: parent.width - width - y: contextButton.height - width: 160 + closePolicy: Popup.CloseOnPressOutside + x: (parent.width - width) + 26 * screenScaleFactor + y: contextButton.height - 5 * screenScaleFactor // Because shadow + width: 182 * screenScaleFactor height: contentItem.height + 2 * padding visible: false + padding: 5 * screenScaleFactor // Because shadow - transformOrigin: Controls2.Popup.Top + transformOrigin: Popup.Top contentItem: Item { - width: popup.width - 2 * popup.padding - height: childrenRect.height + 15 + width: popup.width + height: childrenRect.height + 36 * screenScaleFactor + anchors.topMargin: 10 * screenScaleFactor + anchors.bottomMargin: 10 * screenScaleFactor Controls2.Button { id: pauseButton @@ -470,14 +473,22 @@ Component } width: parent.width enabled: modelData.activePrintJob != null && ["paused", "printing"].indexOf(modelData.activePrintJob.state) >= 0 + visible: enabled anchors.top: parent.top - anchors.topMargin: 10 + anchors.topMargin: 18 * screenScaleFactor + height: visible ? 39 * screenScaleFactor : 0 * screenScaleFactor hoverEnabled: true - background: Rectangle + background: Rectangle { opacity: pauseButton.down || pauseButton.hovered ? 1 : 0 color: UM.Theme.getColor("viewport_background") } + contentItem: Label + { + text: sendToTopButton.text + horizontalAlignment: Text.AlignLeft + verticalAlignment: Text.AlignVCenter + } } Controls2.Button @@ -490,6 +501,7 @@ Component popup.close() } width: parent.width + height: 39 * screenScaleFactor anchors.top: pauseButton.bottom hoverEnabled: true enabled: modelData.activePrintJob != null && ["paused", "printing", "pre_print"].indexOf(modelData.activePrintJob.state) >= 0 @@ -498,6 +510,12 @@ Component opacity: abortButton.down || abortButton.hovered ? 1 : 0 color: UM.Theme.getColor("viewport_background") } + contentItem: Label + { + text: abortButton.text + horizontalAlignment: Text.AlignLeft + verticalAlignment: Text.AlignVCenter + } } } @@ -519,19 +537,20 @@ Component Item { id: pointedRectangle - width: parent.width -10 - height: parent.height -10 + width: parent.width - 10 * screenScaleFactor // Because of the shadow + height: parent.height - 10 * screenScaleFactor // Because of the shadow anchors.horizontalCenter: parent.horizontalCenter anchors.verticalCenter: parent.verticalCenter Rectangle { id: point - height: 13 - width: 13 + height: 14 * screenScaleFactor + width: 14 * screenScaleFactor color: UM.Theme.getColor("setting_control") transform: Rotation { angle: 45} anchors.right: bloop.right + anchors.rightMargin: 24 y: 1 } @@ -541,9 +560,9 @@ Component color: UM.Theme.getColor("setting_control") width: parent.width anchors.top: parent.top - anchors.topMargin: 10 + anchors.topMargin: 8 * screenScaleFactor // Because of the shadow + point anchors.bottom: parent.bottom - anchors.bottomMargin: 5 + anchors.bottomMargin: 8 * screenScaleFactor // Because of the shadow } } } diff --git a/plugins/UM3NetworkPrinting/resources/qml/PrintJobInfoBlock.qml b/plugins/UM3NetworkPrinting/resources/qml/PrintJobInfoBlock.qml index 005c274a29..71c2104318 100644 --- a/plugins/UM3NetworkPrinting/resources/qml/PrintJobInfoBlock.qml +++ b/plugins/UM3NetworkPrinting/resources/qml/PrintJobInfoBlock.qml @@ -30,7 +30,7 @@ Item anchors { top: parent.top - topMargin: 3 + topMargin: 3 * screenScaleFactor left: parent.left leftMargin: base.shadowRadius rightMargin: base.shadowRadius @@ -43,7 +43,7 @@ Item layer.effect: DropShadow { radius: base.shadowRadius - verticalOffset: 2 + verticalOffset: 2 * screenScaleFactor color: "#3F000000" // 25% shadow } @@ -126,7 +126,7 @@ Item right: parent.right margins: 2 * UM.Theme.getSize("default_margin").width leftMargin: UM.Theme.getSize("default_margin").width - rightMargin: UM.Theme.getSize("default_margin").width + rightMargin: UM.Theme.getSize("default_margin").width / 2 } Label @@ -169,7 +169,6 @@ Item { id: contextButton text: "\u22EE" //Unicode; Three stacked points. - font.pixelSize: 25 width: 35 height: width anchors @@ -187,6 +186,14 @@ Item radius: 0.5 * width color: UM.Theme.getColor("viewport_background") } + contentItem: Label + { + text: contextButton.text + color: UM.Theme.getColor("monitor_text_inactive") + font.pixelSize: 25 + verticalAlignment: Text.AlignVCenter + horizontalAlignment: Text.AlignHCenter + } onClicked: parent.switchPopupState() } @@ -196,18 +203,21 @@ Item // TODO Change once updating to Qt5.10 - The 'opened' property is in 5.10 but the behavior is now implemented with the visible property id: popup clip: true - closePolicy: Popup.CloseOnPressOutsideParent - x: parent.width - width - y: contextButton.height - width: 160 + closePolicy: Popup.CloseOnPressOutside + x: (parent.width - width) + 26 * screenScaleFactor + y: contextButton.height - 5 * screenScaleFactor // Because shadow + width: 182 * screenScaleFactor height: contentItem.height + 2 * padding visible: false + padding: 5 * screenScaleFactor // Because shadow transformOrigin: Popup.Top contentItem: Item { - width: popup.width - 2 * popup.padding - height: childrenRect.height + 15 + width: popup.width + height: childrenRect.height + 36 * screenScaleFactor + anchors.topMargin: 10 * screenScaleFactor + anchors.bottomMargin: 10 * screenScaleFactor Button { id: sendToTopButton @@ -219,14 +229,22 @@ Item } width: parent.width enabled: OutputDevice.queuedPrintJobs[0].key != printJob.key + visible: enabled anchors.top: parent.top - anchors.topMargin: 10 + anchors.topMargin: 18 * screenScaleFactor + height: visible ? 39 * screenScaleFactor : 0 * screenScaleFactor hoverEnabled: true - background: Rectangle + background: Rectangle { opacity: sendToTopButton.down || sendToTopButton.hovered ? 1 : 0 color: UM.Theme.getColor("viewport_background") } + contentItem: Label + { + text: sendToTopButton.text + horizontalAlignment: Text.AlignLeft + verticalAlignment: Text.AlignVCenter + } } Button @@ -239,6 +257,7 @@ Item popup.close() } width: parent.width + height: 39 * screenScaleFactor anchors.top: sendToTopButton.bottom hoverEnabled: true background: Rectangle @@ -246,6 +265,12 @@ Item opacity: deleteButton.down || deleteButton.hovered ? 1 : 0 color: UM.Theme.getColor("viewport_background") } + contentItem: Label + { + text: deleteButton.text + horizontalAlignment: Text.AlignLeft + verticalAlignment: Text.AlignVCenter + } } } @@ -267,19 +292,20 @@ Item Item { id: pointedRectangle - width: parent.width -10 - height: parent.height -10 + width: parent.width - 10 * screenScaleFactor // Because of the shadow + height: parent.height - 10 * screenScaleFactor // Because of the shadow anchors.horizontalCenter: parent.horizontalCenter anchors.verticalCenter: parent.verticalCenter Rectangle { id: point - height: 13 - width: 13 + height: 14 * screenScaleFactor + width: 14 * screenScaleFactor color: UM.Theme.getColor("setting_control") transform: Rotation { angle: 45} anchors.right: bloop.right + anchors.rightMargin: 24 y: 1 } @@ -289,9 +315,9 @@ Item color: UM.Theme.getColor("setting_control") width: parent.width anchors.top: parent.top - anchors.topMargin: 10 + anchors.topMargin: 8 * screenScaleFactor // Because of the shadow + point anchors.bottom: parent.bottom - anchors.bottomMargin: 5 + anchors.bottomMargin: 8 * screenScaleFactor // Because of the shadow } } } @@ -331,7 +357,7 @@ Item { text: modelData color: UM.Theme.getColor("viewport_background") - padding: 3 + padding: 3 * screenScaleFactor } } } @@ -353,14 +379,14 @@ Item PrintCoreConfiguration { id: leftExtruderInfo - width: Math.round(parent.width / 2) + width: Math.round(parent.width / 2) * screenScaleFactor printCoreConfiguration: printJob.configuration.extruderConfigurations[0] } PrintCoreConfiguration { id: rightExtruderInfo - width: Math.round(parent.width / 2) + width: Math.round(parent.width / 2) * screenScaleFactor printCoreConfiguration: printJob.configuration.extruderConfigurations[1] } } @@ -370,7 +396,7 @@ Item Rectangle { color: UM.Theme.getColor("viewport_background") - width: 2 + width: 2 * screenScaleFactor anchors.top: parent.top anchors.bottom: parent.bottom anchors.margins: UM.Theme.getSize("default_margin").height From 942d20a8d888c22bb91168416b21034bac40328b Mon Sep 17 00:00:00 2001 From: Ian Paschal Date: Thu, 13 Sep 2018 16:31:07 +0200 Subject: [PATCH 19/19] Monitor Tab - Fix pause button Contributes to CL-1050 --- .../resources/qml/ClusterControlItem.qml | 2 +- .../resources/qml/PrinterVideoStream.qml | 30 ------------------- 2 files changed, 1 insertion(+), 31 deletions(-) diff --git a/plugins/UM3NetworkPrinting/resources/qml/ClusterControlItem.qml b/plugins/UM3NetworkPrinting/resources/qml/ClusterControlItem.qml index 76aff7103a..3362c70bc5 100644 --- a/plugins/UM3NetworkPrinting/resources/qml/ClusterControlItem.qml +++ b/plugins/UM3NetworkPrinting/resources/qml/ClusterControlItem.qml @@ -485,7 +485,7 @@ Component } contentItem: Label { - text: sendToTopButton.text + text: pauseButton.text horizontalAlignment: Text.AlignLeft verticalAlignment: Text.AlignVCenter } diff --git a/plugins/UM3NetworkPrinting/resources/qml/PrinterVideoStream.qml b/plugins/UM3NetworkPrinting/resources/qml/PrinterVideoStream.qml index c193d0ed71..d0213a4571 100644 --- a/plugins/UM3NetworkPrinting/resources/qml/PrinterVideoStream.qml +++ b/plugins/UM3NetworkPrinting/resources/qml/PrinterVideoStream.qml @@ -37,36 +37,6 @@ Item z: 999 } - // Button - // { - // id: backButton - - - // // TODO: Hardcoded sizes - // width: 20 * screenScaleFactor - // height: 20 * screenScaleFactor - - // onClicked: OutputDevice.setActiveCamera(null) - - // style: ButtonStyle - // { - // label: Item - // { - // UM.RecolorImage - // { - // anchors.verticalCenter: parent.verticalCenter - // anchors.horizontalCenter: parent.horizontalCenter - // width: control.width - // height: control.height - // sourceSize.width: width - // sourceSize.height: width - // source: UM.Theme.getIcon("cross1") - // } - // } - // background: Item {} - // } - // } - Image { id: cameraImage