hyprlandxkbindicator: don't reference the button out of nowhere

This commit is contained in:
end-4
2025-10-03 00:50:35 +02:00
parent 8bc2cf335b
commit 027f9a1793
3 changed files with 4 additions and 1 deletions
@@ -293,6 +293,7 @@ Item { // Bar content region
HyprlandXkbIndicator {
Layout.alignment: Qt.AlignVCenter
Layout.rightMargin: indicatorsRowLayout.realSpacing
color: rightSidebarButton.colText
}
MaterialSymbol {
Layout.rightMargin: indicatorsRowLayout.realSpacing
@@ -6,6 +6,7 @@ import qs.modules.common.widgets
Loader {
id: root
property bool vertical: false
property color color: Appearance.colors.colOnSurfaceVariant
active: HyprlandXkb.layoutCodes.length > 1
visible: active
@@ -26,7 +27,7 @@ Loader {
horizontalAlignment: Text.AlignHCenter
text: abbreviateLayoutCode(HyprlandXkb.currentLayoutCode)
font.pixelSize: text.includes("\n") ? Appearance.font.pixelSize.smallie : Appearance.font.pixelSize.small
color: rightSidebarButton.colText
color: root.color
animateChange: true
}
}
@@ -271,6 +271,7 @@ Item { // Bar content region
vertical: true
Layout.alignment: Qt.AlignHCenter
Layout.bottomMargin: indicatorsColumnLayout.realSpacing
color: rightSidebarButton.colText
}
MaterialSymbol {
Layout.bottomMargin: indicatorsColumnLayout.realSpacing