Remove unneeded fixed line hight properties

No idea why this was even done, but there just isnt' a reason to use these.
This commit is contained in:
Jaime van Kessel 2022-02-25 14:27:47 +01:00
parent 3f4f7f0fcf
commit 75ec6f508c
3 changed files with 4 additions and 22 deletions

View file

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

View file

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

View file

@ -550,8 +550,6 @@
"avatar_image": [6.8, 6.8], "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_shadow_radius": [0.4, 0.4],
"monitor_empty_state_offset": [5.6, 5.6], "monitor_empty_state_offset": [5.6, 5.6],
"monitor_empty_state_size": [35.0, 25.0], "monitor_empty_state_size": [35.0, 25.0],