From 348abad6eb0bd95e959c0aaa742b1806eb91d176 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 14 Jan 2022 17:57:42 +0100 Subject: [PATCH] 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. --- resources/qml/ActionButton.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/qml/ActionButton.qml b/resources/qml/ActionButton.qml index 62bea5df3b..c84018fb07 100644 --- a/resources/qml/ActionButton.qml +++ b/resources/qml/ActionButton.qml @@ -148,8 +148,8 @@ Button // Using parent.width is fine in fixedWidthMode. target: buttonText property: "width" - value: button.fixedWidthMode ? button.width - button.leftPadding - button.rightPadding - : ((maximumWidth != 0 && button.contentWidth > maximumWidth) ? maximumWidth : undefined) + value: button.fixedWidthMode ? (button.width - button.leftPadding - button.rightPadding) + : ((button.maximumWidth != 0 && button.implicitContentWidth > button.maximumWidth) ? (button.maximumWidth - (button.width - button.implicitContentWidth) * 2) : undefined) } }