From f630f9c4645b08e7ac349b3f7c67ebbbb1b4e464 Mon Sep 17 00:00:00 2001 From: Mark Date: Wed, 24 May 2017 10:46:38 +0200 Subject: [PATCH] Give text in labels specific width so icons stay aligned --- resources/qml/SidebarSimple.qml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/resources/qml/SidebarSimple.qml b/resources/qml/SidebarSimple.qml index 1e4a715095..c8febad85d 100644 --- a/resources/qml/SidebarSimple.qml +++ b/resources/qml/SidebarSimple.qml @@ -53,7 +53,7 @@ Item id: infillCellRight height: childrenRect.height; - width: base.width * .5 + width: base.width * .55 spacing: UM.Theme.getSize("default_margin").width @@ -169,6 +169,10 @@ Item Text { id: infillLabel + width: (infillCellRight.width - ((infillModel.count - 1) * UM.Theme.getSize("default_margin").width)) / (infillModel.count); + horizontalAlignment: Text.AlignHCenter + verticalAlignment: Text.AlignVCenter + wrapMode: Text.WordWrap font: UM.Theme.getFont("default") anchors.top: infillIconLining.bottom anchors.horizontalCenter: infillIconLining.horizontalCenter