diff options
Diffstat (limited to 'accounts/gkleen@sif/shell/quickshell/KeyboardLayout.qml')
| -rw-r--r-- | accounts/gkleen@sif/shell/quickshell/KeyboardLayout.qml | 34 |
1 files changed, 17 insertions, 17 deletions
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 { | |||
| 18 | height: parent.height | 18 | height: parent.height |
| 19 | anchors.verticalCenter: parent.verticalCenter | 19 | anchors.verticalCenter: parent.verticalCenter |
| 20 | 20 | ||
| 21 | MouseArea { | 21 | WrapperMouseArea { |
| 22 | id: kbdMouseArea | 22 | id: kbdMouseArea |
| 23 | 23 | ||
| 24 | anchors.fill: parent | 24 | anchors.fill: parent |
| @@ -31,25 +31,25 @@ Rectangle { | |||
| 31 | onWheel: event => { | 31 | onWheel: event => { |
| 32 | NiriService.sendCommand({ "Action": { "SwitchLayout": { "layout": event.angleDelta > 0 ? "Next" : "Prev" } } }, _ => {}) | 32 | NiriService.sendCommand({ "Action": { "SwitchLayout": { "layout": event.angleDelta > 0 ? "Next" : "Prev" } } }, _ => {}) |
| 33 | } | 33 | } |
| 34 | } | ||
| 35 | 34 | ||
| 36 | Text { | 35 | Text { |
| 37 | id: kbdLabel | 36 | id: kbdLabel |
| 38 | 37 | ||
| 39 | font.pointSize: 10 | 38 | font.pointSize: 10 |
| 40 | font.family: "Fira Sans" | 39 | font.family: "Fira Sans" |
| 41 | color: { | 40 | color: { |
| 42 | if (NiriService.keyboardLayouts?.current_idx === 0) | 41 | if (NiriService.keyboardLayouts?.current_idx === 0) |
| 43 | return "#555"; | 42 | return "#555"; |
| 44 | return "white"; | 43 | return "white"; |
| 45 | } | 44 | } |
| 46 | anchors.centerIn: parent | 45 | anchors.centerIn: parent |
| 47 | 46 | ||
| 48 | text: { | 47 | text: { |
| 49 | const currentLayout = NiriService.keyboardLayouts?.names?.[NiriService.keyboardLayouts.current_idx]; | 48 | const currentLayout = NiriService.keyboardLayouts?.names?.[NiriService.keyboardLayouts.current_idx]; |
| 50 | if (!currentLayout) | 49 | if (!currentLayout) |
| 51 | return ""; | 50 | return ""; |
| 52 | return kbdWidget.keyboardAbbrev[currentLayout] ? kbdWidget.keyboardAbbrev[currentLayout] : currentLayout; | 51 | return kbdWidget.keyboardAbbrev[currentLayout] ? kbdWidget.keyboardAbbrev[currentLayout] : currentLayout; |
| 52 | } | ||
| 53 | } | 53 | } |
| 54 | } | 54 | } |
| 55 | 55 | ||
