Improve the machine selector header to show an icon in case it is a

network printer.

Contributes to CURA-5942.
This commit is contained in:
Diego Prado Gesto 2018-11-22 17:37:10 +01:00
parent 2b08857331
commit 1d84bd7356
13 changed files with 50 additions and 91 deletions

View file

@ -16,32 +16,35 @@ Item
property alias source: icon.source
property alias color: label.color
property alias font: label.font
height: childrenRect.height
property alias iconSize: icon.width
UM.RecolorImage
{
id: icon
anchors.left: parent.left
anchors.verticalCenter: parent.verticalCenter
source: UM.Theme.getIcon("dot")
source: ""
width: UM.Theme.getSize("section_icon").width
height: UM.Theme.getSize("section_icon").height
height: width
sourceSize.width: width
sourceSize.height: height
color: label.color
visible: source != ""
}
Label
{
id: label
anchors.left: icon.right
anchors.left: icon.visible ? icon.right : parent.left
anchors.right: parent.right
anchors.leftMargin: UM.Theme.getSize("thin_margin").width
anchors.verticalCenter: icon.verticalCenter
text: "Empty label"
elide: Text.ElideRight
color: UM.Theme.getColor("text")
font: UM.Theme.getFont("very_small")
renderType: Text.NativeRendering