From c9b4c6834e390f051e3137a6a45882ea8608ee9d Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Mon, 1 Sep 2025 14:05:25 +0200 Subject: ... --- .../gkleen@sif/shell/quickshell/KeyboardLayout.qml | 34 +++++++++++----------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'accounts/gkleen@sif/shell/quickshell/KeyboardLayout.qml') diff --git a/accounts/gkleen@sif/shell/quickshell/KeyboardLayout.qml b/accounts/gkleen@sif/shell/quickshell/KeyboardLayout.qml index b9f91580..4a6b8390 100644 --- a/accounts/gkleen@sif/shell/quickshell/KeyboardLayout.qml +++ b/accounts/gkleen@sif/shell/quickshell/KeyboardLayout.qml @@ -18,7 +18,7 @@ Rectangle { height: parent.height anchors.verticalCenter: parent.verticalCenter - MouseArea { + WrapperMouseArea { id: kbdMouseArea anchors.fill: parent @@ -31,25 +31,25 @@ Rectangle { onWheel: event => { NiriService.sendCommand({ "Action": { "SwitchLayout": { "layout": event.angleDelta > 0 ? "Next" : "Prev" } } }, _ => {}) } - } - Text { - id: kbdLabel + Text { + id: kbdLabel - font.pointSize: 10 - font.family: "Fira Sans" - color: { - if (NiriService.keyboardLayouts?.current_idx === 0) - return "#555"; - return "white"; - } - anchors.centerIn: parent + font.pointSize: 10 + font.family: "Fira Sans" + color: { + if (NiriService.keyboardLayouts?.current_idx === 0) + return "#555"; + return "white"; + } + anchors.centerIn: parent - text: { - const currentLayout = NiriService.keyboardLayouts?.names?.[NiriService.keyboardLayouts.current_idx]; - if (!currentLayout) - return ""; - return kbdWidget.keyboardAbbrev[currentLayout] ? kbdWidget.keyboardAbbrev[currentLayout] : currentLayout; + text: { + const currentLayout = NiriService.keyboardLayouts?.names?.[NiriService.keyboardLayouts.current_idx]; + if (!currentLayout) + return ""; + return kbdWidget.keyboardAbbrev[currentLayout] ? kbdWidget.keyboardAbbrev[currentLayout] : currentLayout; + } } } -- cgit v1.2.3