From c4846cd97718acba8c5bf3804f617374a32a7285 Mon Sep 17 00:00:00 2001 From: LemmyCook Date: Sun, 7 Sep 2025 18:42:39 -0400 Subject: [PATCH] NPill: improved text centering --- Widgets/NPill.qml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Widgets/NPill.qml b/Widgets/NPill.qml index 794caa9..88d7000 100644 --- a/Widgets/NPill.qml +++ b/Widgets/NPill.qml @@ -67,7 +67,11 @@ Item { NText { id: textItem - anchors.centerIn: parent + anchors.verticalCenter: parent.verticalCenter + anchors.left: rightOpen ? parent.left : undefined + anchors.right: rightOpen ? undefined : parent.right + anchors.leftMargin: rightOpen ? iconSize * 0.8 : 0 + anchors.rightMargin: rightOpen ? 0 : iconSize * 0.8 text: root.text font.pointSize: Style.fontSizeXS * scaling font.weight: Style.fontWeightBold