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")
// 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.
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:
{
toggleContent()
@ -252,9 +253,10 @@ Cura.ExpandablePopup
leftPadding: UM.Theme.getSize("default_margin").width
rightPadding: UM.Theme.getSize("default_margin").width
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
// 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:
{
toggleContent()