bar: fixed kb layout+variant display in top right (#2016)

This commit is contained in:
end-4
2025-09-20 13:02:49 +02:00
committed by GitHub
3 changed files with 39 additions and 15 deletions
@@ -293,11 +293,17 @@ Item { // Bar content region
active: HyprlandXkb.layoutCodes.length > 1
visible: active
Layout.rightMargin: indicatorsRowLayout.realSpacing
sourceComponent: StyledText {
text: HyprlandXkb.currentLayoutCode
font.pixelSize: Appearance.font.pixelSize.small
color: rightSidebarButton.colText
animateChange: true
sourceComponent: Item {
implicitWidth: layoutCodeText.implicitWidth
StyledText {
id: layoutCodeText
anchors.centerIn: parent
horizontalAlignment: Text.AlignHCenter
text: HyprlandXkb.currentLayoutCode.split(":").join("\n")
font.pixelSize: text.includes("\n") ? Appearance.font.pixelSize.smaller : Appearance.font.pixelSize.small
color: rightSidebarButton.colText
animateChange: true
}
}
}
MaterialSymbol {
@@ -273,11 +273,18 @@ Item { // Bar content region
active: HyprlandXkb.layoutCodes.length > 1
visible: active
Layout.bottomMargin: indicatorsColumnLayout.realSpacing
sourceComponent: StyledText {
text: HyprlandXkb.currentLayoutCode
font.pixelSize: Appearance.font.pixelSize.small
color: rightSidebarButton.colText
animateChange: 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.smaller : Appearance.font.pixelSize.small
color: rightSidebarButton.colText
animateChange: true
}
}
}
MaterialSymbol {