Fixed alignment of printCoreConfiguration

CL-896
This commit is contained in:
Jaime van Kessel 2018-08-30 10:32:37 +02:00
parent 14f253017b
commit fd1b0a80e7

View File

@ -18,6 +18,8 @@ Item
id: extruderCircle id: extruderCircle
width: 30 width: 30
height: 30 height: 30
anchors.verticalCenter: printAndMaterialLabel.verticalCenter
opacity: opacity:
{ {
if(printCoreConfiguration == undefined || printCoreConfiguration.activeMaterial == undefined || printCoreConfiguration.hotendID == undefined) if(printCoreConfiguration == undefined || printCoreConfiguration.activeMaterial == undefined || printCoreConfiguration.hotendID == undefined)
@ -31,7 +33,7 @@ Item
{ {
anchors.fill: parent anchors.fill: parent
radius: Math.round(width / 2) radius: Math.round(width / 2)
border.width: 1 border.width: 2
border.color: "black" border.color: "black"
} }
@ -43,52 +45,48 @@ Item
} }
} }
Label Item
{ {
id: materialLabel id: printAndMaterialLabel
text:
{
if(printCoreConfiguration != undefined && printCoreConfiguration.activeMaterial != undefined)
{
return printCoreConfiguration.activeMaterial.name
}
return ""
}
font: UM.Theme.getFont("default_bold")
elide: Text.ElideRight
anchors anchors
{ {
right: parent.right right: parent.right
left: extruderCircle.right left: extruderCircle.right
margins: UM.Theme.getSize("default_margin").width margins: UM.Theme.getSize("default_margin").width
} }
} height: childrenRect.height
Label Label
{
id: printCoreLabel
text:
{ {
if(printCoreConfiguration != undefined && printCoreConfiguration.hotendID != undefined) id: materialLabel
text:
{ {
return printCoreConfiguration.hotendID if(printCoreConfiguration != undefined && printCoreConfiguration.activeMaterial != undefined)
{
return printCoreConfiguration.activeMaterial.name
}
return ""
} }
return "" font: UM.Theme.getFont("default_bold")
elide: Text.ElideRight
} }
anchors.top: materialLabel.bottom
elide: Text.ElideRight
opacity: 0.6 Label
font: UM.Theme.getFont("default")
anchors
{ {
top: materialLabel.bottom id: printCoreLabel
right: parent.right text:
left: extruderCircle.right {
leftMargin: UM.Theme.getSize("default_margin").width if(printCoreConfiguration != undefined && printCoreConfiguration.hotendID != undefined)
rightMargin: UM.Theme.getSize("default_margin").width {
return printCoreConfiguration.hotendID
}
return ""
}
anchors.top: materialLabel.bottom
elide: Text.ElideRight
opacity: 0.6
font: UM.Theme.getFont("default")
} }
} }
} }