Fix decimals on heated bed temperature monitor (HeatedBedBox.qml)

Round heated bed temperature values when printer sends them with decimal digits. 
Same roundings already exist on the extruder temperatures (see ExtruderBox.qml line 50 and 85)
This commit is contained in:
Asteroids 2023-02-04 01:26:00 +01:00 committed by GitHub
parent 8134cce3b8
commit 17c020b3cd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -32,7 +32,7 @@ Item
UM.Label UM.Label
{ {
id: bedTargetTemperature id: bedTargetTemperature
text: printerModel != null ? printerModel.targetBedTemperature + "°C" : "" text: printerModel != null ? Math.round(printerModel.targetBedTemperature) + "°C" : ""
font: UM.Theme.getFont("default_bold") font: UM.Theme.getFont("default_bold")
color: UM.Theme.getColor("text_inactive") color: UM.Theme.getColor("text_inactive")
anchors.right: parent.right anchors.right: parent.right
@ -66,7 +66,7 @@ Item
UM.Label UM.Label
{ {
id: bedCurrentTemperature id: bedCurrentTemperature
text: printerModel != null ? printerModel.bedTemperature + "°C" : "" text: printerModel != null ? Math.round(printerModel.bedTemperature) + "°C" : ""
font: UM.Theme.getFont("large_bold") font: UM.Theme.getFont("large_bold")
anchors.right: bedTargetTemperature.left anchors.right: bedTargetTemperature.left
anchors.top: parent.top anchors.top: parent.top