From f9545a339d32e4b3d6a09c8858876bee3f5cc674 Mon Sep 17 00:00:00 2001 From: Ian Paschal Date: Tue, 23 Oct 2018 15:41:56 +0200 Subject: [PATCH] QML Clean-up Contributes to CL-897, CL-1051, CL-1111 --- plugins/UM3NetworkPrinting/resources/qml/CameraButton.qml | 2 +- .../UM3NetworkPrinting/resources/qml/ClusterMonitorItem.qml | 4 ++-- .../resources/qml/ConfigurationChangeBlock.qml | 6 +++--- .../UM3NetworkPrinting/resources/qml/PrintJobPreview.qml | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/plugins/UM3NetworkPrinting/resources/qml/CameraButton.qml b/plugins/UM3NetworkPrinting/resources/qml/CameraButton.qml index 2fcf52c463..f8dd3bc467 100644 --- a/plugins/UM3NetworkPrinting/resources/qml/CameraButton.qml +++ b/plugins/UM3NetworkPrinting/resources/qml/CameraButton.qml @@ -11,7 +11,7 @@ Rectangle { property var iconSource: null; color: clickArea.containsMouse ? UM.Theme.getColor("primary_hover") : UM.Theme.getColor("primary"); // "Cura Blue" height: width; - radius: 0.5 * width; + radius: Math.round(0.5 * width); width: 36 * screenScaleFactor; UM.RecolorImage { diff --git a/plugins/UM3NetworkPrinting/resources/qml/ClusterMonitorItem.qml b/plugins/UM3NetworkPrinting/resources/qml/ClusterMonitorItem.qml index c26425cd3e..c79092863e 100644 --- a/plugins/UM3NetworkPrinting/resources/qml/ClusterMonitorItem.qml +++ b/plugins/UM3NetworkPrinting/resources/qml/ClusterMonitorItem.qml @@ -51,7 +51,7 @@ Component { id: queuedLabel; anchors { left: queuedPrintJobs.left; - leftMargin: 3 * UM.Theme.getSize("default_margin").width + 5; + leftMargin: 3 * UM.Theme.getSize("default_margin").width + 5 * screenScaleFactor; top: parent.top; topMargin: 2 * UM.Theme.getSize("default_margin").height; } @@ -119,7 +119,7 @@ Component { printJob: modelData; } model: OutputDevice.queuedPrintJobs; - spacing: UM.Theme.getSize("default_margin").height - 10; // 2x the shadow radius + spacing: UM.Theme.getSize("default_margin").height - 2 * UM.Theme.getSize("monitor_shadow_radius").width; } } diff --git a/plugins/UM3NetworkPrinting/resources/qml/ConfigurationChangeBlock.qml b/plugins/UM3NetworkPrinting/resources/qml/ConfigurationChangeBlock.qml index b1ebca3680..4b11a2b6be 100644 --- a/plugins/UM3NetworkPrinting/resources/qml/ConfigurationChangeBlock.qml +++ b/plugins/UM3NetworkPrinting/resources/qml/ConfigurationChangeBlock.qml @@ -39,16 +39,16 @@ Item { } color: { if(configurationChangeToggle.containsMouse) { - return UM.Theme.getColor("viewport_background"); // TODO: Theme! + return UM.Theme.getColor("viewport_background"); } else { return "transparent"; } } - height: UM.Theme.getSize("default_margin").height * 4; // TODO: Theme! + height: UM.Theme.getSize("default_margin").height * 4; width: parent.width; Rectangle { - color: "#e6e6e6"; // TODO: Theme! + color: UM.Theme.getColor("monitor_lining_light"); height: UM.Theme.getSize("default_lining").height; width: parent.width; } diff --git a/plugins/UM3NetworkPrinting/resources/qml/PrintJobPreview.qml b/plugins/UM3NetworkPrinting/resources/qml/PrintJobPreview.qml index 50308e28a9..b1a73255f4 100644 --- a/plugins/UM3NetworkPrinting/resources/qml/PrintJobPreview.qml +++ b/plugins/UM3NetworkPrinting/resources/qml/PrintJobPreview.qml @@ -63,13 +63,13 @@ Item { id: statusImage; anchors.centerIn: parent; color: "black"; // TODO: Theme! - height: 0.5 * parent.height; + height: Math.round(0.5 * parent.height); source: job && job.state == "error" ? "../svg/aborted-icon.svg" : ""; sourceSize { height: height; width: width; } visible: source != ""; - width: 0.5 * parent.width; + width: Math.round(0.5 * parent.width); } } \ No newline at end of file