mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-11-28 21:31:15 -07: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
|
id: extruderRow
|
||||||
|
|
||||||
width: parent.width - 2 * parent.padding
|
anchors
|
||||||
|
{
|
||||||
|
left: parent.left
|
||||||
|
leftMargin: parent.padding
|
||||||
|
right: parent.right
|
||||||
|
rightMargin: parent.padding
|
||||||
|
}
|
||||||
height: childrenRect.height
|
height: childrenRect.height
|
||||||
|
|
||||||
spacing: UM.Theme.getSize("default_margin").width
|
spacing: UM.Theme.getSize("default_margin").width
|
||||||
|
|
@ -58,7 +64,13 @@ Button
|
||||||
id: separator
|
id: separator
|
||||||
|
|
||||||
visible: buildplateInformation.visible
|
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
|
height: visible ? Math.round(UM.Theme.getSize("thick_lining").height / 2) : 0
|
||||||
color: UM.Theme.getColor("text")
|
color: UM.Theme.getColor("text")
|
||||||
}
|
}
|
||||||
|
|
@ -66,7 +78,14 @@ Button
|
||||||
Item
|
Item
|
||||||
{
|
{
|
||||||
id: buildplateInformation
|
id: buildplateInformation
|
||||||
width: parent.width - 2 * parent.padding
|
|
||||||
|
anchors
|
||||||
|
{
|
||||||
|
left: parent.left
|
||||||
|
leftMargin: parent.padding
|
||||||
|
right: parent.right
|
||||||
|
rightMargin: parent.padding
|
||||||
|
}
|
||||||
height: childrenRect.height
|
height: childrenRect.height
|
||||||
visible: configuration.buildplateConfiguration != ""
|
visible: configuration.buildplateConfiguration != ""
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue