diff --git a/cura/Scene/ConvexHullDecorator.py b/cura/Scene/ConvexHullDecorator.py index 1aae97942a..2d8224eecc 100644 --- a/cura/Scene/ConvexHullDecorator.py +++ b/cura/Scene/ConvexHullDecorator.py @@ -66,6 +66,10 @@ class ConvexHullDecorator(SceneNodeDecorator): node.boundingBoxChanged.connect(self._onChanged) + per_object_stack = node.callDecoration("getStack") + if per_object_stack: + per_object_stack.propertyChanged.connect(self._onSettingValueChanged) + self._onChanged() ## Force that a new (empty) object is created upon copy. @@ -76,7 +80,8 @@ class ConvexHullDecorator(SceneNodeDecorator): def getConvexHull(self) -> Optional[Polygon]: if self._node is None: return None - + if self._node.callDecoration("isNonPrintingMesh"): + return None hull = self._compute2DConvexHull() if self._global_stack and self._node is not None and hull is not None: @@ -106,7 +111,8 @@ class ConvexHullDecorator(SceneNodeDecorator): def getConvexHullHead(self) -> Optional[Polygon]: if self._node is None: return None - + if self._node.callDecoration("isNonPrintingMesh"): + return None if self._global_stack: if self._global_stack.getProperty("print_sequence", "value") == "one_at_a_time" and not self.hasGroupAsParent(self._node): head_with_fans = self._compute2DConvexHeadMin() @@ -122,6 +128,9 @@ class ConvexHullDecorator(SceneNodeDecorator): def getConvexHullBoundary(self) -> Optional[Polygon]: if self._node is None: return None + + if self._node.callDecoration("isNonPrintingMesh"): + return None if self._global_stack: if self._global_stack.getProperty("print_sequence", "value") == "one_at_a_time" and not self.hasGroupAsParent(self._node): @@ -398,4 +407,4 @@ class ConvexHullDecorator(SceneNodeDecorator): ## Settings that change the convex hull. # # If these settings change, the convex hull should be recalculated. - _influencing_settings = {"xy_offset", "xy_offset_layer_0", "mold_enabled", "mold_width"} + _influencing_settings = {"xy_offset", "xy_offset_layer_0", "mold_enabled", "mold_width", "anti_overhang_mesh", "infill_mesh", "cutting_mesh"} 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/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 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 218055ba6e..9d118fa7dd 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] } }