mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-24 15:13:56 -06:00
Add a proper component with a label and a rectangle in the background
that shows the type of printer. Contributes to CURA-5942.
This commit is contained in:
parent
9720512f50
commit
0211122b12
4 changed files with 27 additions and 5 deletions
|
@ -17,7 +17,7 @@ Button
|
|||
leftPadding: Math.round(1.5 * UM.Theme.getSize("default_margin").width)
|
||||
checkable: true
|
||||
|
||||
property var outputDevice: Cura.MachineManager.printerOutputDevices[0]
|
||||
property var outputDevice: null
|
||||
property var printerTypesList: []
|
||||
|
||||
function setPrinterTypesList()
|
||||
|
@ -63,9 +63,27 @@ Button
|
|||
Repeater
|
||||
{
|
||||
model: printerTypesList
|
||||
delegate: Label
|
||||
delegate: Item
|
||||
{
|
||||
text: modelData
|
||||
width: UM.Theme.getSize("printer_type_label").width
|
||||
height: UM.Theme.getSize("printer_type_label").height
|
||||
|
||||
Rectangle
|
||||
{
|
||||
anchors.fill: parent
|
||||
color: UM.Theme.getColor("printer_type_label_background")
|
||||
}
|
||||
|
||||
Label
|
||||
{
|
||||
id: printerTypeLabel
|
||||
text: modelData
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
renderType: Text.NativeRendering
|
||||
font: UM.Theme.getFont("very_small")
|
||||
color: UM.Theme.getColor("text")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue