Add a maximumWidth to the ActionButton

In case the text is too long, it can exceed the limits of the container. This is an optional flag that will work only in case it's set up.

Contributes to CURA-6412.
This commit is contained in:
Diego Prado Gesto 2019-03-22 17:10:42 +01:00
parent 6611ab7d17
commit a793a06b60
2 changed files with 7 additions and 1 deletions

View file

@ -159,6 +159,7 @@ Cura.ExpandablePopup
leftPadding: UM.Theme.getSize("default_margin").width
rightPadding: UM.Theme.getSize("default_margin").width
text: catalog.i18nc("@button", "Add printer")
maximumWidth: UM.Theme.getSize("machine_selector_widget_content").width / 2 - 2.5 * UM.Theme.getSize("default_margin").width
onClicked:
{
toggleContent()
@ -171,6 +172,7 @@ Cura.ExpandablePopup
leftPadding: UM.Theme.getSize("default_margin").width
rightPadding: UM.Theme.getSize("default_margin").width
text: catalog.i18nc("@button", "Manage printers")
maximumWidth: UM.Theme.getSize("machine_selector_widget_content").width / 2 - 2.5 * UM.Theme.getSize("default_margin").width
onClicked:
{
toggleContent()