Fix maximumWidth properties on ActionButtons

Turns out this wasn't really functional. We didn't use it. Now we use it for the MessageStack.

Contributes to issue CURA-8682.
This commit is contained in:
Ghostkeeper 2022-01-14 17:57:42 +01:00
parent b5e7a60a8a
commit 348abad6eb
No known key found for this signature in database
GPG key ID: D2A8871EE34EC59A

View file

@ -148,8 +148,8 @@ Button
// Using parent.width is fine in fixedWidthMode. // Using parent.width is fine in fixedWidthMode.
target: buttonText target: buttonText
property: "width" property: "width"
value: button.fixedWidthMode ? button.width - button.leftPadding - button.rightPadding value: button.fixedWidthMode ? (button.width - button.leftPadding - button.rightPadding)
: ((maximumWidth != 0 && button.contentWidth > maximumWidth) ? maximumWidth : undefined) : ((button.maximumWidth != 0 && button.implicitContentWidth > button.maximumWidth) ? (button.maximumWidth - (button.width - button.implicitContentWidth) * 2) : undefined)
} }
} }