Give the machineButton selectors a fixed width

This prevents them from popping out of the interface for certain
languages
This commit is contained in:
Jaime van Kessel 2020-08-25 10:59:14 +02:00
parent 792f81315b
commit afb29724ff
No known key found for this signature in database
GPG Key ID: 3710727397403C91

View File

@ -238,7 +238,8 @@ Cura.ExpandablePopup
text: catalog.i18nc("@button", "Add printer") text: catalog.i18nc("@button", "Add printer")
// The maximum width of the button is half of the total space, minus the padding of the parent, the left // 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. // padding of the component and half the spacing because of the space between buttons.
maximumWidth: UM.Theme.getSize("machine_selector_widget_content").width / 2 - parent.padding - leftPadding - parent.spacing / 2 fixedWidthMode: true
width: UM.Theme.getSize("machine_selector_widget_content").width / 2 - leftPadding
onClicked: onClicked:
{ {
toggleContent() toggleContent()
@ -252,9 +253,10 @@ Cura.ExpandablePopup
leftPadding: UM.Theme.getSize("default_margin").width leftPadding: UM.Theme.getSize("default_margin").width
rightPadding: UM.Theme.getSize("default_margin").width rightPadding: UM.Theme.getSize("default_margin").width
text: catalog.i18nc("@button", "Manage printers") text: catalog.i18nc("@button", "Manage printers")
fixedWidthMode: true
// The maximum width of the button is half of the total space, minus the padding of the parent, the right // 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. // padding of the component and half the spacing because of the space between buttons.
maximumWidth: UM.Theme.getSize("machine_selector_widget_content").width / 2 - parent.padding - rightPadding - parent.spacing / 2 width: UM.Theme.getSize("machine_selector_widget_content").width / 2 - leftPadding
onClicked: onClicked:
{ {
toggleContent() toggleContent()