Просмотр исходного кода

Add round to minContentWidth

This prevents text from getting a weird width

CURA-5785
Jaime van Kessel 6 лет назад
Родитель
Сommit
5972bfaf03
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      resources/qml/IconWithText.qml

+ 1 - 1
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