Browse Source

Remove unneeded fixed line hight properties

No idea why this was even done, but there just isnt' a reason to use these.
Jaime van Kessel 3 years ago
parent
commit
75ec6f508c

+ 3 - 12
plugins/MonitorStage/MonitorMain.qml

@@ -3,7 +3,7 @@
 
 import QtQuick 2.10
 import QtQuick.Controls 2.0
-import UM 1.3 as UM
+import UM 1.5 as UM
 import Cura 1.0 as Cura
 
 // We show a nice overlay on the 3D viewer when the current output device has no monitor view
@@ -90,7 +90,7 @@ Rectangle
         visible: monitorViewComponent.sourceComponent == null
 
         // CASE 2: CAN MONITOR & NOT CONNECTED
-        Label
+        UM.Label
         {
             anchors
             {
@@ -99,14 +99,10 @@ Rectangle
             visible: isNetworkConfigured && !isConnected
             text: catalog.i18nc("@info", "Please make sure your printer has a connection:\n- Check if the printer is turned on.\n- Check if the printer is connected to the network.\n- Check if you are signed in to discover cloud-connected printers.")
             font: UM.Theme.getFont("medium")
-            color: UM.Theme.getColor("text")
-            wrapMode: Text.WordWrap
-            lineHeight: UM.Theme.getSize("monitor_text_line_large").height
-            lineHeightMode: Text.FixedHeight
             width: contentWidth
         }
 
-        Label
+        UM.Label
         {
             id: noNetworkLabel
             anchors
@@ -116,11 +112,7 @@ Rectangle
             visible: !isNetworkConfigured && isNetworkConfigurable
             text: catalog.i18nc("@info", "Please connect your printer to the network.")
             font: UM.Theme.getFont("medium")
-            color: UM.Theme.getColor("text")
-            wrapMode: Text.WordWrap
             width: contentWidth
-            lineHeight: UM.Theme.getSize("monitor_text_line_large").height
-            lineHeightMode: Text.FixedHeight
         }
         Item
         {
@@ -129,7 +121,6 @@ Rectangle
                 left: noNetworkLabel.left
             }
             visible: !isNetworkConfigured && isNetworkConfigurable
-            height: UM.Theme.getSize("monitor_text_line").height
             width: childrenRect.width
 
             UM.RecolorImage

+ 1 - 8
plugins/UM3NetworkPrinting/resources/qml/MonitorPrintJobProgressBar.qml

@@ -18,7 +18,7 @@ Item
     property var printJob: null
 
     width: childrenRect.width
-    height: UM.Theme.getSize("monitor_text_line").height
+    height: percentLabel.height
 
     UM.ProgressBar
     {
@@ -39,14 +39,11 @@ Item
         {
             left: progressBar.right
             leftMargin: UM.Theme.getSize("default_margin").width
-            verticalCenter: parent.verticalCenter
         }
         text: printJob ? Math.round(printJob.progress * 100) + "%" : "0%"
         color: printJob && printJob.isActive ? UM.Theme.getColor("text") : UM.Theme.getColor("monitor_text_disabled")
         width: contentWidth
         wrapMode: Text.NoWrap
-        // FIXED-LINE-HEIGHT:
-        height: UM.Theme.getSize("monitor_text_line").height
     }
     UM.Label
     {
@@ -55,7 +52,6 @@ Item
         {
             left: percentLabel.right
             leftMargin: UM.Theme.getSize("default_margin").width
-            verticalCenter: parent.verticalCenter
         }
         wrapMode: Text.NoWrap
         text:
@@ -111,8 +107,5 @@ Item
             }
         }
         width: contentWidth
-
-        // FIXED-LINE-HEIGHT:
-        height: UM.Theme.getSize("monitor_text_line").height
     }
 }

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

@@ -550,8 +550,6 @@
 
         "avatar_image": [6.8, 6.8],
 
-        "monitor_text_line": [1.5, 1.5],
-        "monitor_text_line_large": [2.33, 2.33],
         "monitor_shadow_radius": [0.4, 0.4],
         "monitor_empty_state_offset": [5.6, 5.6],
         "monitor_empty_state_size": [35.0, 25.0],