mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-15 00:05:59 +08: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
@ -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…
x
Reference in New Issue
Block a user