From c9588d173f16ddee76ac5a3b1a752650e97255d4 Mon Sep 17 00:00:00 2001 From: Ian Paschal Date: Mon, 20 May 2019 12:18:38 +0200 Subject: [PATCH 1/2] Add monitor column to theme Contributes to CL-1329 --- .../UM3NetworkPrinting/resources/qml/MonitorPrintJobCard.qml | 4 ++-- plugins/UM3NetworkPrinting/resources/qml/MonitorQueue.qml | 4 ++-- resources/themes/cura-light/theme.json | 3 ++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/plugins/UM3NetworkPrinting/resources/qml/MonitorPrintJobCard.qml b/plugins/UM3NetworkPrinting/resources/qml/MonitorPrintJobCard.qml index d80f2e5b9f..470eb84ac3 100644 --- a/plugins/UM3NetworkPrinting/resources/qml/MonitorPrintJobCard.qml +++ b/plugins/UM3NetworkPrinting/resources/qml/MonitorPrintJobCard.qml @@ -51,7 +51,7 @@ Item { anchors.verticalCenter: parent.verticalCenter height: 18 * screenScaleFactor // TODO: Theme! - width: 216 * screenScaleFactor // TODO: Theme! (Should match column size) + width: UM.Theme.getSize("monitor_column").width Rectangle { color: UM.Theme.getColor("monitor_skeleton_loading") @@ -79,7 +79,7 @@ Item { anchors.verticalCenter: parent.verticalCenter height: 18 * screenScaleFactor // TODO: Theme! - width: 216 * screenScaleFactor // TODO: Theme! (Should match column size) + width: UM.Theme.getSize("monitor_column").width Rectangle { color: UM.Theme.getColor("monitor_skeleton_loading") diff --git a/plugins/UM3NetworkPrinting/resources/qml/MonitorQueue.qml b/plugins/UM3NetworkPrinting/resources/qml/MonitorQueue.qml index 6025d7acfe..8460425190 100644 --- a/plugins/UM3NetworkPrinting/resources/qml/MonitorQueue.qml +++ b/plugins/UM3NetworkPrinting/resources/qml/MonitorQueue.qml @@ -120,7 +120,7 @@ Item elide: Text.ElideRight font: UM.Theme.getFont("medium") // 14pt, regular anchors.verticalCenter: parent.verticalCenter - width: 216 * screenScaleFactor // TODO: Theme! (Should match column size) + width: UM.Theme.getSize("monitor_column").width // FIXED-LINE-HEIGHT: height: 18 * screenScaleFactor // TODO: Theme! @@ -135,7 +135,7 @@ Item elide: Text.ElideRight font: UM.Theme.getFont("medium") // 14pt, regular anchors.verticalCenter: parent.verticalCenter - width: 216 * screenScaleFactor // TODO: Theme! (Should match column size) + width: UM.Theme.getSize("monitor_column").width // FIXED-LINE-HEIGHT: height: 18 * screenScaleFactor // TODO: Theme! diff --git a/resources/themes/cura-light/theme.json b/resources/themes/cura-light/theme.json index d1c4600f27..5cb41bb7c1 100644 --- a/resources/themes/cura-light/theme.json +++ b/resources/themes/cura-light/theme.json @@ -618,6 +618,7 @@ "monitor_shadow_offset": [0.15, 0.15], "monitor_empty_state_offset": [5.6, 5.6], "monitor_empty_state_size": [35.0, 25.0], - "monitor_external_link_icon": [1.16, 1.16] + "monitor_external_link_icon": [1.16, 1.16], + "monitor_column": [18.0, 1.0] } } From 3b7b554f1a86138ea373a0fc9f2a1281ade832cd Mon Sep 17 00:00:00 2001 From: Ian Paschal Date: Mon, 20 May 2019 12:18:55 +0200 Subject: [PATCH 2/2] Update MonitorPrintJobProgressBar.qml Contributes to CL-1329 --- .../resources/qml/MonitorPrintJobProgressBar.qml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plugins/UM3NetworkPrinting/resources/qml/MonitorPrintJobProgressBar.qml b/plugins/UM3NetworkPrinting/resources/qml/MonitorPrintJobProgressBar.qml index bcc7f9a358..e6d09b68f6 100644 --- a/plugins/UM3NetworkPrinting/resources/qml/MonitorPrintJobProgressBar.qml +++ b/plugins/UM3NetworkPrinting/resources/qml/MonitorPrintJobProgressBar.qml @@ -28,9 +28,12 @@ Item anchors { verticalCenter: parent.verticalCenter + left: parent.left } value: printJob ? printJob.progress : 0 + width: UM.Theme.getSize("monitor_column").width } + Label { id: percentLabel @@ -38,6 +41,7 @@ Item { left: progressBar.right leftMargin: 18 * screenScaleFactor // TODO: Theme! + 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") @@ -56,6 +60,7 @@ Item { left: percentLabel.right leftMargin: 18 * screenScaleFactor // TODO: Theme! + verticalCenter: parent.verticalCenter } color: UM.Theme.getColor("monitor_text_primary") font: UM.Theme.getFont("medium") // 14pt, regular