mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-23 14:44:13 -06:00
Align printer name & printjob name with center of printer icon
CL-896
This commit is contained in:
parent
60353bcd67
commit
14f253017b
1 changed files with 33 additions and 23 deletions
|
@ -137,17 +137,38 @@ Component
|
||||||
color: modelData.activePrintJob != undefined ? UM.Theme.getColor("primary") : UM.Theme.getColor("setting_control_disabled")
|
color: modelData.activePrintJob != undefined ? UM.Theme.getColor("primary") : UM.Theme.getColor("setting_control_disabled")
|
||||||
}
|
}
|
||||||
|
|
||||||
Label
|
Item
|
||||||
{
|
{
|
||||||
id: machineNameLabel
|
height: childrenRect.height
|
||||||
text: modelData.name
|
anchors
|
||||||
anchors.top: machineIcon.top
|
{
|
||||||
anchors.left: machineIcon.right
|
right: collapseIcon.left
|
||||||
anchors.leftMargin: UM.Theme.getSize("default_margin").width
|
rightMargin: UM.Theme.getSize("default_margin").width
|
||||||
anchors.right: collapseIcon.left
|
left: machineIcon.right
|
||||||
anchors.rightMargin: UM.Theme.getSize("default_margin").width
|
leftMargin: UM.Theme.getSize("default_margin").width
|
||||||
elide: Text.ElideRight
|
|
||||||
font: UM.Theme.getFont("default_bold")
|
verticalCenter: machineIcon.verticalCenter
|
||||||
|
}
|
||||||
|
|
||||||
|
Label
|
||||||
|
{
|
||||||
|
id: machineNameLabel
|
||||||
|
text: modelData.name
|
||||||
|
width: parent.width
|
||||||
|
elide: Text.ElideRight
|
||||||
|
font: UM.Theme.getFont("default_bold")
|
||||||
|
}
|
||||||
|
|
||||||
|
Label
|
||||||
|
{
|
||||||
|
id: activeJobLabel
|
||||||
|
text: modelData.activePrintJob != null ? modelData.activePrintJob.name : "waiting"
|
||||||
|
anchors.top: machineNameLabel.bottom
|
||||||
|
width: parent.width
|
||||||
|
elide: Text.ElideRight
|
||||||
|
font: UM.Theme.getFont("default")
|
||||||
|
opacity: 0.6
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
UM.RecolorImage
|
UM.RecolorImage
|
||||||
|
@ -163,19 +184,6 @@ Component
|
||||||
anchors.rightMargin: UM.Theme.getSize("default_margin").width
|
anchors.rightMargin: UM.Theme.getSize("default_margin").width
|
||||||
color: "black"
|
color: "black"
|
||||||
}
|
}
|
||||||
|
|
||||||
Label
|
|
||||||
{
|
|
||||||
id: activeJobLabel
|
|
||||||
text: modelData.activePrintJob != null ? modelData.activePrintJob.name : "waiting"
|
|
||||||
anchors.top: machineNameLabel.bottom
|
|
||||||
anchors.left: machineNameLabel.left
|
|
||||||
anchors.right: collapseIcon.left
|
|
||||||
anchors.rightMargin: UM.Theme.getSize("default_margin").width
|
|
||||||
elide: Text.ElideRight
|
|
||||||
font: UM.Theme.getFont("default")
|
|
||||||
opacity: 0.6
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Item
|
Item
|
||||||
|
@ -573,6 +581,8 @@ Component
|
||||||
return catalog.i18nc("@label:status", "Paused")
|
return catalog.i18nc("@label:status", "Paused")
|
||||||
case "resuming":
|
case "resuming":
|
||||||
return catalog.i18nc("@label:status", "Resuming")
|
return catalog.i18nc("@label:status", "Resuming")
|
||||||
|
case "queued":
|
||||||
|
return catalog.i18nc("@label:status", "Configuration change")
|
||||||
default:
|
default:
|
||||||
OutputDevice.formatDuration(modelData.activePrintJob.timeTotal - modelData.activePrintJob.timeElapsed)
|
OutputDevice.formatDuration(modelData.activePrintJob.timeTotal - modelData.activePrintJob.timeElapsed)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue