mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-09 14:55:03 -06:00
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:
parent
801701623e
commit
759b5b5847
1 changed files with 22 additions and 3 deletions
|
@ -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 != ""
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue