mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2026-06-12 06:41:03 +00:00
NPill: fixed, finally!
This commit is contained in:
+6
-4
@@ -68,10 +68,12 @@ Item {
|
|||||||
NText {
|
NText {
|
||||||
id: textItem
|
id: textItem
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
anchors.left: rightOpen ? parent.left : undefined
|
x: {
|
||||||
anchors.right: rightOpen ? undefined : parent.right
|
// Little tweak to have a better text horizontal centering
|
||||||
anchors.leftMargin: rightOpen ? iconSize * 0.8 : 0
|
var centerX = (parent.width - width) / 2
|
||||||
anchors.rightMargin: rightOpen ? 0 : iconSize * 0.8
|
var offset = rightOpen ? Style.marginXS * scaling : -Style.marginXS * scaling
|
||||||
|
return centerX + offset
|
||||||
|
}
|
||||||
text: root.text
|
text: root.text
|
||||||
font.pointSize: Style.fontSizeXS * scaling
|
font.pointSize: Style.fontSizeXS * scaling
|
||||||
font.weight: Style.fontWeightBold
|
font.weight: Style.fontWeightBold
|
||||||
|
|||||||
Reference in New Issue
Block a user