NPill: improved text centering
This commit is contained in:
parent
f95c9b76d4
commit
c4846cd977
1 changed files with 5 additions and 1 deletions
|
|
@ -67,7 +67,11 @@ Item {
|
||||||
|
|
||||||
NText {
|
NText {
|
||||||
id: textItem
|
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
|
text: root.text
|
||||||
font.pointSize: Style.fontSizeXS * scaling
|
font.pointSize: Style.fontSizeXS * scaling
|
||||||
font.weight: Style.fontWeightBold
|
font.weight: Style.fontWeightBold
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue