From a5c2a734875a859d60bba81242861fb8d4e16290 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 31 Oct 2018 13:08:59 +0100 Subject: [PATCH 1/2] Fix adhesion type checkbox if default is skirt The remove-unused-values feature doesn't work with settings that are resolved, because we try to remove them at the appropriate position in the stack but then we check at that position in the stack if the value is not the same as what it was, but with this check the resolve function is no longer evaluated. It's complex, but hard to solve because we can't try to remove it at this location and predict that this will change the actual final value after the resolve function has done its thing. Contributes to issue CURA-5877. --- resources/qml/SidebarSimple.qml | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/qml/SidebarSimple.qml b/resources/qml/SidebarSimple.qml index ec673f2823..ddb42f44c6 100644 --- a/resources/qml/SidebarSimple.qml +++ b/resources/qml/SidebarSimple.qml @@ -1118,6 +1118,7 @@ Item { id: platformAdhesionType containerStack: Cura.MachineManager.activeMachine + removeUnusedValue: false //Doesn't work with settings that are resolved. key: "adhesion_type" watchedProperties: [ "value", "enabled" ] storeIndex: 0 From 1ba8eff7fadc2f3e2726002d93ca42d4e34d0a77 Mon Sep 17 00:00:00 2001 From: Ian Paschal Date: Wed, 31 Oct 2018 13:52:31 +0100 Subject: [PATCH 2/2] Don't show camera icon unless printer details are expanded Contributes to CL-1063 --- .../resources/qml/PrinterCard.qml | 55 +++++-------------- .../resources/qml/PrinterCardDetails.qml | 14 +++-- 2 files changed, 23 insertions(+), 46 deletions(-) diff --git a/plugins/UM3NetworkPrinting/resources/qml/PrinterCard.qml b/plugins/UM3NetworkPrinting/resources/qml/PrinterCard.qml index 6c6df7d7fb..24beaf70fe 100644 --- a/plugins/UM3NetworkPrinting/resources/qml/PrinterCard.qml +++ b/plugins/UM3NetworkPrinting/resources/qml/PrinterCard.qml @@ -36,7 +36,7 @@ Item { return UM.Theme.getColor("monitor_card_background"); } } - height: childrenRect.height + UM.Theme.getSize("default_margin").height; + height: childrenRect.height; layer.effect: DropShadow { radius: root.shadowRadius; verticalOffset: root.shadowOffset; @@ -47,29 +47,25 @@ Item { Column { id: cardContents; - anchors { - top: parent.top; - topMargin: UM.Theme.getSize("default_margin").height; - } height: childrenRect.height; width: parent.width; - spacing: UM.Theme.getSize("default_margin").height; // Main card Item { id: mainCard; - height: 60 * screenScaleFactor; + anchors { + left: parent.left; + leftMargin: UM.Theme.getSize("default_margin").width; + right: parent.right; + rightMargin: UM.Theme.getSize("default_margin").width; + } + height: 60 * screenScaleFactor + 2 * UM.Theme.getSize("default_margin").height; width: parent.width; // Machine icon Item { id: machineIcon; - anchors { - leftMargin: UM.Theme.getSize("wide_margin").width; - top: parent.top; - left: parent.left; - margins: UM.Theme.getSize("default_margin").width; - } + anchors.verticalCenter: parent.verticalCenter; height: parent.height - 2 * UM.Theme.getSize("default_margin").width; width: height; @@ -228,17 +224,6 @@ Item { } } } - - HorizontalLine { - anchors { - left: parent.left; - leftMargin: UM.Theme.getSize("default_margin").width; - right: parent.right; - rightMargin: UM.Theme.getSize("default_margin").width; - } - visible: root.printer; - } - // Detailed card PrinterCardDetails { collapsed: root.collapsed; @@ -246,25 +231,11 @@ Item { visible: root.printer; } - CameraButton { - id: showCameraButton; - anchors { - left: parent.left; - leftMargin: UM.Theme.getSize("default_margin").width; - } - iconSource: "../svg/camera-icon.svg"; - visible: root.printer && root.printJob; + // Progress bar + PrinterCardProgressBar { + visible: printer && printer.activePrintJob != null; + width: parent.width; } } - - // Progress bar - PrinterCardProgressBar { - anchors { - top: cardContents.bottom; - topMargin: UM.Theme.getSize("default_margin").height; - } - visible: printer && printer.activePrintJob != null; - width: parent.width; - } } } diff --git a/plugins/UM3NetworkPrinting/resources/qml/PrinterCardDetails.qml b/plugins/UM3NetworkPrinting/resources/qml/PrinterCardDetails.qml index 097bd5c7a6..31da388b00 100644 --- a/plugins/UM3NetworkPrinting/resources/qml/PrinterCardDetails.qml +++ b/plugins/UM3NetworkPrinting/resources/qml/PrinterCardDetails.qml @@ -28,18 +28,18 @@ Item { right: parent.right; rightMargin: UM.Theme.getSize("default_margin").width; } - height: childrenRect.height + UM.Theme.getSize("wide_margin").height; + height: childrenRect.height + UM.Theme.getSize("default_margin").height; spacing: UM.Theme.getSize("default_margin").height; width: parent.width; + HorizontalLine {} + PrinterInfoBlock { printer: root.printer; printJob: root.printer ? root.printer.activePrintJob : null; } - HorizontalLine { - visible: root.printJob; - } + HorizontalLine {} Row { height: childrenRect.height; @@ -65,5 +65,11 @@ Item { job: root.printer && root.printer.activePrintJob ? root.printer.activePrintJob : null; visible: root.printJob; } + + CameraButton { + id: showCameraButton; + iconSource: "../svg/camera-icon.svg"; + visible: root.printer; + } } }