Browse Source

Fix printer card skeleton colors

Contributes to CL-1051
Ian Paschal 6 years ago
parent
commit
d077dcc851

+ 8 - 5
plugins/UM3NetworkPrinting/resources/qml/PrinterCard.qml

@@ -60,16 +60,18 @@ Item {
                     id: machineIcon;
                     anchors {
                         leftMargin: UM.Theme.getSize("wide_margin").width;
+                        top: parent.top;
+                        left: parent.left;
                         margins: UM.Theme.getSize("default_margin").width;
                     }
-                    height: parent.height;
+                    height: parent.height - 2 * UM.Theme.getSize("default_margin").width;
                     width: height;
 
                     // Skeleton
                     Rectangle {
                         anchors.fill: parent;
-                        color: UM.Theme.getColor("monitor_skeleton_fill"); // TODO: Theme!
-                        radius: UM.Theme.getSize("default_margin").width; // TODO: Theme!
+                        color: UM.Theme.getColor("monitor_skeleton_fill_dark");
+                        radius: UM.Theme.getSize("default_margin").width;
                         visible: !printer;
                     }
 
@@ -106,6 +108,7 @@ Item {
                     id: printerInfo;
                     anchors {
                         left: machineIcon.right;
+                        leftMargin: UM.Theme.getSize("default_margin").width;
                         right: collapseIcon.left;
                         verticalCenter: machineIcon.verticalCenter;
                     }
@@ -120,7 +123,7 @@ Item {
                         // Skeleton
                         Rectangle {
                             anchors.fill: parent;
-                            color: UM.Theme.getColor("monitor_skeleton_fill"); // TODO: Theme!
+                            color: UM.Theme.getColor("monitor_skeleton_fill_dark");
                             visible: !printer;
                         }
 
@@ -149,7 +152,7 @@ Item {
                         // Skeleton
                         Rectangle {
                             anchors.fill: parent;
-                            color: UM.Theme.getColor("monitor_skeleton_fill"); // TODO: Theme!
+                            color: UM.Theme.getColor("monitor_skeleton_fill_dark");
                             visible: !printer;
                         }
 

+ 2 - 1
resources/themes/cura-dark/theme.json

@@ -240,6 +240,7 @@
         "monitor_progress_fill_text": [0, 0, 0, 255],
         "monitor_progress_fill": [216, 216, 216, 255],
         "monotir_printer_icon_inactive": [154, 154, 154, 255],
-        "monitor_skeleton_fill": [31, 36, 39, 255]
+        "monitor_skeleton_fill": [31, 36, 39, 255],
+        "monitor_skeleton_fill_dark": [31, 36, 39, 255]
     }
 }

+ 1 - 0
resources/themes/cura-light/theme.json

@@ -342,6 +342,7 @@
         "monitor_progress_fill": [12, 169, 227, 255],
         "monitor_shadow": [0, 0, 0, 63],
         "monitor_skeleton_fill": [245, 245, 245, 255],
+        "monitor_skeleton_fill_dark": [216, 216, 216, 255],
         "monitor_text_inactive": [154, 154, 154, 255]
     },