Re-use PrinterTypeLabel component and use abbreviated name

Contributes to issue CURA-5876.
This commit is contained in:
Ghostkeeper 2018-11-27 15:24:58 +01:00
parent c1bb1a9b98
commit 3ad2e4f62a
No known key found for this signature in database
GPG key ID: 86BEF881AE2CF276

View file

@ -46,21 +46,11 @@ Column
section.criteria: ViewSection.FullString section.criteria: ViewSection.FullString
section.delegate: Item section.delegate: Item
{ {
height: printerTypeLabelBox.height + UM.Theme.getSize("default_margin").height height: printerTypeLabel.height + UM.Theme.getSize("default_margin").height
Rectangle Cura.PrinterTypeLabel
{ {
id: printerTypeLabelBox id: printerTypeLabel
color: UM.Theme.getColor("text_detail") text: Cura.MachineManager.getAbbreviatedMachineName(section)
width: childrenRect.width
height: childrenRect.height
Label
{
text: section
font: UM.Theme.getFont("small")
color: UM.Theme.getColor("text")
padding: UM.Theme.getSize("narrow_margin").width
}
} }
} }