NCircleStat + KeyboardLayout: converted to Layout

This commit is contained in:
LemmyCook 2025-09-05 18:33:51 -04:00
parent cf624f4d65
commit 5d7e168a57
2 changed files with 24 additions and 20 deletions

View file

@ -1,4 +1,5 @@
import QtQuick
import QtQuick.Layouts
import Quickshell
import Quickshell.Wayland
import Quickshell.Io
@ -6,7 +7,7 @@ import qs.Commons
import qs.Services
import qs.Widgets
Row {
RowLayout {
id: root
property ShellScreen screen
@ -18,12 +19,17 @@ Row {
// Use the shared service for keyboard layout
property string currentLayout: KeyboardLayoutService.currentLayout
width: pill.width
height: pill.height
Layout.preferredWidth: pill.implicitWidth
Layout.preferredHeight: pill.implicitHeight
spacing: 0
NPill {
id: pill
Layout.alignment: Qt.AlignCenter
Layout.fillWidth: false
Layout.fillHeight: false
rightOpen: BarWidgetRegistry.getNPillDirection(root)
icon: "keyboard_alt"
iconCircleColor: Color.mPrimary
@ -33,9 +39,8 @@ Row {
tooltipText: "Keyboard layout: " + currentLayout
onClicked: {
// You could open keyboard settings here if needed
// For now, just show the current layout
}
}
}
}