Use anchors rather than a calculation with padding

It's supposed to be slightly more efficient.

Contributes to issue CURA-5876.
This commit is contained in:
Ghostkeeper 2018-12-04 14:23:41 +01:00
parent 801701623e
commit 759b5b5847
No known key found for this signature in database
GPG key ID: 86BEF881AE2CF276

View file

@ -34,7 +34,13 @@ Button
{
id: extruderRow
width: parent.width - 2 * parent.padding
anchors
{
left: parent.left
leftMargin: parent.padding
right: parent.right
rightMargin: parent.padding
}
height: childrenRect.height
spacing: UM.Theme.getSize("default_margin").width
@ -58,7 +64,13 @@ Button
id: separator
visible: buildplateInformation.visible
width: parent.width - 2 * parent.padding
anchors
{
left: parent.left
leftMargin: parent.padding
right: parent.right
rightMargin: parent.padding
}
height: visible ? Math.round(UM.Theme.getSize("thick_lining").height / 2) : 0
color: UM.Theme.getColor("text")
}
@ -66,7 +78,14 @@ Button
Item
{
id: buildplateInformation
width: parent.width - 2 * parent.padding
anchors
{
left: parent.left
leftMargin: parent.padding
right: parent.right
rightMargin: parent.padding
}
height: childrenRect.height
visible: configuration.buildplateConfiguration != ""