Align the material and variant labels in the center of the header

CURA-8013
This commit is contained in:
Konstantinos Karmas 2021-06-30 11:10:25 +02:00
parent 348bf0c4c1
commit 327acfd49c

View file

@ -56,10 +56,21 @@ Cura.ExpandablePopup
id: extruderIcon
materialColor: model.color
extruderEnabled: model.enabled
height: parent.height
width: height
width: UM.Theme.getSize("button_icon").width
anchors.verticalCenter: parent.verticalCenter
}
Item
{
height: childrenRect.height
anchors
{
left: extruderIcon.right
leftMargin: UM.Theme.getSize("default_margin").width
verticalCenter: parent.verticalCenter
right: parent.right
rightMargin: UM.Theme.getSize("default_margin").width
}
// Label for the brand of the material
Label
{
@ -73,11 +84,9 @@ Cura.ExpandablePopup
anchors
{
top: extruderIcon.top
left: extruderIcon.right
leftMargin: UM.Theme.getSize("default_margin").width
top: parent.top
left: parent.left
right: parent.right
rightMargin: UM.Theme.getSize("default_margin").width
}
visible: !truncated
}
@ -94,11 +103,9 @@ Cura.ExpandablePopup
anchors
{
top: extruderIcon.top
left: extruderIcon.right
leftMargin: UM.Theme.getSize("default_margin").width
top: parent.top
left: parent.left
right: parent.right
rightMargin: UM.Theme.getSize("default_margin").width
}
visible: !materialBrandColorTypeLabel.visible && !truncated
@ -116,11 +123,9 @@ Cura.ExpandablePopup
anchors
{
top: extruderIcon.top
left: extruderIcon.right
leftMargin: UM.Theme.getSize("default_margin").width
top: parent.top
left: parent.left
right: parent.right
rightMargin: UM.Theme.getSize("default_margin").width
}
visible: !materialBrandColorTypeLabel.visible && !materialColorTypeLabel.visible
}
@ -139,11 +144,10 @@ Cura.ExpandablePopup
anchors
{
left: extruderIcon.right
leftMargin: UM.Theme.getSize("default_margin").width
left: parent.left
top: materialBrandColorTypeLabel.bottom
right: parent.right
rightMargin: UM.Theme.getSize("default_margin").width
}
}
}
}