From 5972bfaf0342d41f987ec38d1cb7c00c56dab4cb Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Fri, 16 Nov 2018 15:06:21 +0100 Subject: [PATCH] Add round to minContentWidth This prevents text from getting a weird width CURA-5785 --- resources/qml/IconWithText.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/qml/IconWithText.qml b/resources/qml/IconWithText.qml index 9ce2f412cc..dcb3ef7851 100644 --- a/resources/qml/IconWithText.qml +++ b/resources/qml/IconWithText.qml @@ -21,7 +21,7 @@ Item // These properties can be used in combination with layouts. readonly property real contentWidth: icon.width + margin + label.contentWidth - readonly property real minContentWidth: icon.width + margin + 0.5 * label.contentWidth + readonly property real minContentWidth: Math.round(icon.width + margin + 0.5 * label.contentWidth) Layout.minimumWidth: minContentWidth Layout.preferredWidth: contentWidth