Merge branch 'main' of github.com:noctalia-dev/noctalia-shell

This commit is contained in:
LemmyCook 2025-09-10 20:45:56 -04:00
commit b157d855a8
8 changed files with 423 additions and 33 deletions

View file

@ -13,6 +13,26 @@ Item {
property ShellScreen screen
property real scaling: 1.0
// Widget properties passed from Bar.qml for per-instance settings
property string widgetId: ""
property string barSection: ""
property int sectionWidgetIndex: -1
property int sectionWidgetsCount: 0
property var widgetMetadata: BarWidgetRegistry.widgetMetadata[widgetId]
property var widgetSettings: {
var section = barSection.replace("Section", "").toLowerCase()
if (section && sectionWidgetIndex >= 0) {
var widgets = Settings.data.bar.widgets[section]
if (widgets && sectionWidgetIndex < widgets.length) {
return widgets[sectionWidgetIndex]
}
}
return {}
}
readonly property bool forceOpen: (widgetSettings.forceOpen !== undefined) ? widgetSettings.forceOpen : widgetMetadata.forceOpen
// Use the shared service for keyboard layout
property string currentLayout: KeyboardLayoutService.currentLayout
@ -26,8 +46,10 @@ Item {
rightOpen: BarWidgetRegistry.getNPillDirection(root)
icon: "keyboard"
autoHide: false // Important to be false so we can hover as long as we want
text: currentLayout
tooltipText: "Keyboard layout: " + currentLayout
text: currentLayout.toUpperCase()
tooltipText: "Keyboard layout: " + currentLayout.toUpperCase()
forceOpen: root.forceOpen
fontSize: Style.fontSizeS // Use larger font size
onClicked: {