NPill: improved text centering

This commit is contained in:
LemmyCook 2025-09-07 18:42:39 -04:00
parent f95c9b76d4
commit c4846cd977

View file

@ -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