bar: refractor xkb layout indicator

This commit is contained in:
end-4
2025-09-20 23:18:41 +02:00
parent 06d6d3a9ca
commit 688bf0bef8
3 changed files with 31 additions and 31 deletions
@@ -269,23 +269,10 @@ Item { // Bar content region
color: rightSidebarButton.colText
}
}
Loader {
active: HyprlandXkb.layoutCodes.length > 1
visible: active
Layout.bottomMargin: indicatorsColumnLayout.realSpacing
Bar.HyprlandXkbIndicator {
vertical: true
Layout.alignment: Qt.AlignHCenter
sourceComponent: Item {
implicitHeight: layoutCodeText.implicitHeight
StyledText {
id: layoutCodeText
anchors.centerIn: parent
horizontalAlignment: Text.AlignHCenter
text: HyprlandXkb.currentLayoutCode.split(":").join("\n")
font.pixelSize: text.includes("\n") ? Appearance.font.pixelSize.smallie : Appearance.font.pixelSize.small
color: rightSidebarButton.colText
animateChange: true
}
}
Layout.bottomMargin: indicatorsColumnLayout.realSpacing
}
MaterialSymbol {
Layout.bottomMargin: indicatorsColumnLayout.realSpacing