Browse Source

Merge remote-tracking branch 'origin/4.0' into CL-1165_missing_cloud_info

Ian Paschal 6 years ago
parent
commit
32072e3bfe

+ 6 - 0
cura/BuildVolume.py

@@ -1043,6 +1043,12 @@ class BuildVolume(SceneNode):
         else:
             raise Exception("Unknown bed adhesion type. Did you forget to update the build volume calculations for your new bed adhesion type?")
 
+        max_length_available = 0.5 * min(
+            self._global_container_stack.getProperty("machine_width", "value"),
+            self._global_container_stack.getProperty("machine_depth", "value")
+        )
+        bed_adhesion_size = min(bed_adhesion_size, max_length_available)
+
         support_expansion = 0
         support_enabled = self._global_container_stack.getProperty("support_enable", "value")
         support_offset = self._global_container_stack.getProperty("support_offset", "value")

+ 9 - 4
cura/Scene/ConvexHullDecorator.py

@@ -289,16 +289,21 @@ class ConvexHullDecorator(SceneNodeDecorator):
         # Add extra margin depending on adhesion type
         adhesion_type = self._global_stack.getProperty("adhesion_type", "value")
 
+        max_length_available = 0.5 * min(
+            self._getSettingProperty("machine_width", "value"),
+            self._getSettingProperty("machine_depth", "value")
+        )
+
         if adhesion_type == "raft":
-            extra_margin = max(0, self._getSettingProperty("raft_margin", "value"))
+            extra_margin = min(max_length_available, max(0, self._getSettingProperty("raft_margin", "value")))
         elif adhesion_type == "brim":
-            extra_margin = max(0, self._getSettingProperty("brim_line_count", "value") * self._getSettingProperty("skirt_brim_line_width", "value"))
+            extra_margin = min(max_length_available, max(0, self._getSettingProperty("brim_line_count", "value") * self._getSettingProperty("skirt_brim_line_width", "value")))
         elif adhesion_type == "none":
             extra_margin = 0
         elif adhesion_type == "skirt":
-            extra_margin = max(
+            extra_margin = min(max_length_available, max(
                 0, self._getSettingProperty("skirt_gap", "value") +
-                   self._getSettingProperty("skirt_line_count", "value") * self._getSettingProperty("skirt_brim_line_width", "value"))
+                   self._getSettingProperty("skirt_line_count", "value") * self._getSettingProperty("skirt_brim_line_width", "value")))
         else:
             raise Exception("Unknown bed adhesion type. Did you forget to update the convex hull calculations for your new bed adhesion type?")
 

BIN
plugins/CuraDrive/src/qml/images/loading.gif


+ 2 - 2
plugins/CuraEngineBackend/CuraEngineBackend.py

@@ -151,7 +151,7 @@ class CuraEngineBackend(QObject, Backend):
         if self._multi_build_plate_model:
             self._multi_build_plate_model.activeBuildPlateChanged.connect(self._onActiveViewChanged)
 
-        self._application.globalContainerStackChanged.connect(self._onGlobalStackChanged)
+        self._application.getMachineManager().globalContainerChanged.connect(self._onGlobalStackChanged)
         self._onGlobalStackChanged()
 
         # extruder enable / disable. Actually wanted to use machine manager here, but the initialization order causes it to crash
@@ -821,7 +821,7 @@ class CuraEngineBackend(QObject, Backend):
                 extruder.propertyChanged.disconnect(self._onSettingChanged)
                 extruder.containersChanged.disconnect(self._onChanged)
 
-        self._global_container_stack = self._application.getGlobalContainerStack()
+        self._global_container_stack = self._application.getMachineManager().activeMachine
 
         if self._global_container_stack:
             self._global_container_stack.propertyChanged.connect(self._onSettingChanged)  # Note: Only starts slicing when the value changed.

BIN
plugins/Toolbox/resources/images/loading.gif


+ 0 - 1
plugins/Toolbox/resources/images/loading.svg

@@ -1 +0,0 @@
-<svg width="200px" height="200px" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid" class="lds-rolling" style="animation-play-state: running; animation-delay: 0s; background-image: none; background-position: initial initial; background-repeat: initial initial;"><circle cx="50" cy="50" fill="none" ng-attr-stroke="{{config.color}}" ng-attr-stroke-width="{{config.width}}" ng-attr-r="{{config.radius}}" ng-attr-stroke-dasharray="{{config.dasharray}}" stroke="#0CA9E3" stroke-width="13" r="43" stroke-dasharray="202.63272615654165 69.54424205218055" style="animation-play-state: running; animation-delay: 0s;"><animateTransform attributeName="transform" type="rotate" calcMode="linear" values="0 50 50;360 50 50" keyTimes="0;1" dur="1s" begin="0s" repeatCount="indefinite" style="animation-play-state: running; animation-delay: 0s;"></animateTransform></circle></svg>

+ 1 - 12
plugins/Toolbox/resources/qml/ToolboxProgressButton.qml

@@ -62,17 +62,6 @@ Item
                 readyAction()
             }
         }
-    }
-
-    AnimatedImage
-    {
-        id: loader
-        visible: active
-        source: visible ? "../images/loading.gif" : ""
-        width: UM.Theme.getSize("toolbox_loader").width
-        height: UM.Theme.getSize("toolbox_loader").height
-        anchors.right: button.left
-        anchors.rightMargin: UM.Theme.getSize("default_margin").width
-        anchors.verticalCenter: button.verticalCenter
+        busy: active
     }
 }

+ 2 - 2
plugins/UM3NetworkPrinting/resources/qml/CameraButton.qml

@@ -13,7 +13,7 @@ Rectangle {
     property var enabled: true
 
     property var iconSource: null;
-    color: !enabled ? "#cccccc" : "#0a0850" // TODO: Theme!
+    color: UM.Theme.getColor("monitor_icon_primary")
     height: width;
     radius: Math.round(0.5 * width);
     width: 24 * screenScaleFactor;
@@ -24,7 +24,7 @@ Rectangle {
             horizontalCenter: parent.horizontalCenter;
             verticalCenter: parent.verticalCenter;
         }
-        color: UM.Theme.getColor("primary_text");
+        color: UM.Theme.getColor("monitor_icon_accent");
         height: width;
         source: iconSource;
         width: Math.round(parent.width / 2);

+ 9 - 8
plugins/UM3NetworkPrinting/resources/qml/ExpandableCard.qml

@@ -6,10 +6,11 @@ import QtQuick.Controls 2.0
 import UM 1.3 as UM
 import Cura 1.0 as Cura
 
-// TODO: Theme & documentation!
-// The expandable component has 3 major sub components:
-//      * The headerItem Always visible and should hold some info about what happens if the component is expanded
-//      * The popupItem The content that needs to be shown if the component is expanded.
+/**
+ * The expandable component has 3 major sub components:
+ *  - The headerItem Always visible and should hold some info about what happens if the component is expanded
+ *  - The popupItem The content that needs to be shown if the component is expanded.
+ */
 Item
 {
     id: base
@@ -17,10 +18,10 @@ Item
     property bool expanded: false
     property bool enabled: true
     property var borderWidth: 1
-    property color borderColor: "#CCCCCC"
-    property color headerBackgroundColor: "white"
-    property color headerHoverColor: "#e8f2fc"
-    property color drawerBackgroundColor: "white"
+    property color borderColor: UM.Theme.getColor("monitor_card_border")
+    property color headerBackgroundColor: UM.Theme.getColor("monitor_icon_accent")
+    property color headerHoverColor: UM.Theme.getColor("monitor_card_hover")
+    property color drawerBackgroundColor: UM.Theme.getColor("monitor_icon_accent")
     property alias headerItem: header.children
     property alias drawerItem: drawer.children
 

+ 3 - 3
plugins/UM3NetworkPrinting/resources/qml/MonitorBuildplateConfiguration.qml

@@ -41,7 +41,7 @@ Item
                 anchors.centerIn: parent
                 height: parent.height
                 width: height
-                color: buildplateIcon.visible > 0 ? "transparent" : "#eeeeee" // TODO: Theme!
+                color: buildplateIcon.visible > 0 ? "transparent" : UM.Theme.getColor("monitor_skeleton_loading")
                 radius: Math.floor(height / 2)
             }
 
@@ -49,7 +49,7 @@ Item
             {
                 id: buildplateIcon
                 anchors.centerIn: parent
-                color: "#0a0850" // TODO: Theme! (Standard purple)
+                color: UM.Theme.getColor("monitor_icon_primary")
                 height: parent.height
                 source: "../svg/icons/buildplate.svg"
                 width: height
@@ -60,7 +60,7 @@ Item
         Label
         {
             id: buildplateLabel
-            color: "#191919" // TODO: Theme!
+            color: UM.Theme.getColor("monitor_text_primary")
             elide: Text.ElideRight
             font: UM.Theme.getFont("default") // 12pt, regular
             text: buildplate ? buildplate : ""

Some files were not shown because too many files changed in this diff