Adjust button size according to width

CURA-9514
This commit is contained in:
joeydelarago 2022-08-23 16:17:36 +02:00
parent 90f53bbdc1
commit db0b668739

View File

@ -224,6 +224,9 @@ Cura.ExpandablePopup
anchors.bottom: parent.bottom
anchors.horizontalCenter: parent.horizontalCenter
anchors.left: parent.left
anchors.right: parent.right
padding: UM.Theme.getSize("default_margin").width
spacing: UM.Theme.getSize("default_margin").width
@ -236,7 +239,7 @@ Cura.ExpandablePopup
// The maximum width of the button is half of the total space, minus the padding of the parent, the left
// padding of the component and half the spacing because of the space between buttons.
fixedWidthMode: true
width: UM.Theme.getSize("machine_selector_widget_content").width / 2 - leftPadding
width: buttonRow.width / 2 - leftPadding * 1.5
onClicked:
{
toggleContent()
@ -253,7 +256,7 @@ Cura.ExpandablePopup
fixedWidthMode: true
// The maximum width of the button is half of the total space, minus the padding of the parent, the right
// padding of the component and half the spacing because of the space between buttons.
width: UM.Theme.getSize("machine_selector_widget_content").width / 2 - leftPadding
width: buttonRow.width / 2 - rightPadding * 1.5
onClicked:
{
toggleContent()