From 772fb1da7d1292bccd92e51ae8b9bd8a8c2e557d Mon Sep 17 00:00:00 2001 From: bokicoder <1556588440@qq.com> Date: Wed, 12 Nov 2025 20:24:28 +0800 Subject: [PATCH 1/7] Calendar: add missing import --- Modules/Panels/Calendar/CalendarPanel.qml | 1 + 1 file changed, 1 insertion(+) diff --git a/Modules/Panels/Calendar/CalendarPanel.qml b/Modules/Panels/Calendar/CalendarPanel.qml index 53d7de72..8d1bf3ab 100644 --- a/Modules/Panels/Calendar/CalendarPanel.qml +++ b/Modules/Panels/Calendar/CalendarPanel.qml @@ -7,6 +7,7 @@ import qs.Commons import qs.Modules.MainScreen import qs.Modules.Panels.ControlCenter.Cards import qs.Services.Location +import qs.Services.System import qs.Services.UI import qs.Widgets From e67f27f58dafe98eedceef68a79ee51aa6e6bbe2 Mon Sep 17 00:00:00 2001 From: ItsLemmy Date: Wed, 12 Nov 2025 08:00:59 -0500 Subject: [PATCH 2/7] SmartPanel: added exclusiveKeyboard flag. Should fix launcher focus on hyprland. --- Modules/MainScreen/MainScreen.qml | 6 +++++- Modules/MainScreen/SmartPanel.qml | 3 +++ Modules/Panels/Launcher/Launcher.qml | 2 ++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Modules/MainScreen/MainScreen.qml b/Modules/MainScreen/MainScreen.qml index 3187ebc7..24c6f873 100644 --- a/Modules/MainScreen/MainScreen.qml +++ b/Modules/MainScreen/MainScreen.qml @@ -63,7 +63,11 @@ PanelWindow { if (CompositorService.isNiri) { return root.isPanelOpen ? WlrKeyboardFocus.Exclusive : WlrKeyboardFocus.None } else { - return root.isPanelOpen ? WlrKeyboardFocus.OnDemand : WlrKeyboardFocus.None + if (!root.isPanelOpen) { + return WlrKeyboardFocus.None + } else { + return PanelService.openedPanel.exclusiveKeyboard ? WlrKeyboardFocus.Exclusive : WlrKeyboardFocus.OnDemand + } } } diff --git a/Modules/MainScreen/SmartPanel.qml b/Modules/MainScreen/SmartPanel.qml index 58cabc37..e7330f13 100644 --- a/Modules/MainScreen/SmartPanel.qml +++ b/Modules/MainScreen/SmartPanel.qml @@ -43,6 +43,9 @@ Item { // Edge snapping: if panel is within this distance (in pixels) from a screen edge, snap property real edgeSnapDistance: 50 + // Edge snapping: if panel is within this distance (in pixels) from a screen edge, snap + property bool exclusiveKeyboard: false + // Track whether panel is open property bool isPanelOpen: false diff --git a/Modules/Panels/Launcher/Launcher.qml b/Modules/Panels/Launcher/Launcher.qml index 9747b3ee..ca8fc07a 100644 --- a/Modules/Panels/Launcher/Launcher.qml +++ b/Modules/Panels/Launcher/Launcher.qml @@ -19,6 +19,8 @@ SmartPanel { preferredWidthRatio: 0.3 preferredHeightRatio: 0.5 + exclusiveKeyboard: true + panelBackgroundColor: Qt.alpha(Color.mSurface, Settings.data.appLauncher.backgroundOpacity) // Positioning From d781f52e1aa1fa4636ecab090bdc92ed79996420 Mon Sep 17 00:00:00 2001 From: ItsLemmy Date: Wed, 12 Nov 2025 08:21:22 -0500 Subject: [PATCH 3/7] NIconButton: add missing wheel signal argument. --- Widgets/NIconButton.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Widgets/NIconButton.qml b/Widgets/NIconButton.qml index 4dfb1273..eee7523e 100644 --- a/Widgets/NIconButton.qml +++ b/Widgets/NIconButton.qml @@ -30,7 +30,7 @@ Rectangle { signal clicked signal rightClicked signal middleClicked - signal wheel + signal wheel(int angleDelta) implicitWidth: applyUiScale ? Math.round(baseSize * Style.uiScaleRatio) : Math.round(baseSize) implicitHeight: applyUiScale ? Math.round(baseSize * Style.uiScaleRatio) : Math.round(baseSize) From 875aca2a36a9315de869cf27d1903771c7ae8e31 Mon Sep 17 00:00:00 2001 From: ItsLemmy Date: Wed, 12 Nov 2025 08:28:02 -0500 Subject: [PATCH 4/7] Wi-Fi + BT: Right clicking icons on the bar or control center to enable/disable the feature immediately. --- Modules/Bar/Widgets/Bluetooth.qml | 2 +- Modules/Bar/Widgets/WiFi.qml | 2 +- Modules/Panels/ControlCenter/Widgets/Bluetooth.qml | 5 ++--- Modules/Panels/ControlCenter/Widgets/WiFi.qml | 1 + 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Modules/Bar/Widgets/Bluetooth.qml b/Modules/Bar/Widgets/Bluetooth.qml index 2ce3fea6..a6b5894b 100644 --- a/Modules/Bar/Widgets/Bluetooth.qml +++ b/Modules/Bar/Widgets/Bluetooth.qml @@ -56,7 +56,7 @@ Item { forceOpen: !isBarVertical && root.displayMode === "alwaysShow" forceClose: isBarVertical || root.displayMode === "alwaysHide" || BluetoothService.connectedDevices.length === 0 onClicked: PanelService.getPanel("bluetoothPanel", screen)?.toggle(this) - onRightClicked: PanelService.getPanel("bluetoothPanel", screen)?.toggle(this) + onRightClicked: BluetoothService.setBluetoothEnabled(!BluetoothService.enabled) tooltipText: { if (pill.text !== "") { return pill.text diff --git a/Modules/Bar/Widgets/WiFi.qml b/Modules/Bar/Widgets/WiFi.qml index ad2d1ede..2c23542b 100644 --- a/Modules/Bar/Widgets/WiFi.qml +++ b/Modules/Bar/Widgets/WiFi.qml @@ -78,7 +78,7 @@ Item { forceOpen: !isBarVertical && root.displayMode === "alwaysShow" forceClose: isBarVertical || root.displayMode === "alwaysHide" || !pill.text onClicked: PanelService.getPanel("wifiPanel", screen)?.toggle(this) - onRightClicked: PanelService.getPanel("wifiPanel", screen)?.toggle(this) + onRightClicked: NetworkService.setWifiEnabled(!Settings.data.network.wifiEnabled) tooltipText: { if (pill.text !== "") { return pill.text diff --git a/Modules/Panels/ControlCenter/Widgets/Bluetooth.qml b/Modules/Panels/ControlCenter/Widgets/Bluetooth.qml index d3ab79ad..e6280a37 100644 --- a/Modules/Panels/ControlCenter/Widgets/Bluetooth.qml +++ b/Modules/Panels/ControlCenter/Widgets/Bluetooth.qml @@ -10,7 +10,6 @@ NIconButtonHot { icon: BluetoothService.enabled ? "bluetooth" : "bluetooth-off" tooltipText: I18n.tr("quickSettings.bluetooth.tooltip.action") - onClicked: { - PanelService.getPanel("bluetoothPanel", screen)?.toggle(this) - } + onClicked: PanelService.getPanel("bluetoothPanel", screen)?.toggle(this) + onRightClicked: BluetoothService.setBluetoothEnabled(!BluetoothService.enabled) } diff --git a/Modules/Panels/ControlCenter/Widgets/WiFi.qml b/Modules/Panels/ControlCenter/Widgets/WiFi.qml index e40047f1..2ea25141 100644 --- a/Modules/Panels/ControlCenter/Widgets/WiFi.qml +++ b/Modules/Panels/ControlCenter/Widgets/WiFi.qml @@ -31,4 +31,5 @@ NIconButtonHot { tooltipText: I18n.tr("quickSettings.wifi.tooltip.action") onClicked: PanelService.getPanel("wifiPanel", screen)?.toggle(this) + onRightClicked: NetworkService.setWifiEnabled(!Settings.data.network.wifiEnabled) } From 9b2b4b4bd19b96aedd5329b12192764f9ce3671d Mon Sep 17 00:00:00 2001 From: ItsLemmy Date: Wed, 12 Nov 2025 08:38:30 -0500 Subject: [PATCH 5/7] TrayDrawer: proper auto sizing when elements are added or removed. --- Modules/Panels/Tray/TrayDrawerPanel.qml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Modules/Panels/Tray/TrayDrawerPanel.qml b/Modules/Panels/Tray/TrayDrawerPanel.qml index ae1376a9..ffc9bb8d 100644 --- a/Modules/Panels/Tray/TrayDrawerPanel.qml +++ b/Modules/Panels/Tray/TrayDrawerPanel.qml @@ -74,7 +74,7 @@ SmartPanel { readonly property int columns: Math.max(1, Math.min(maxColumns, itemCount)) readonly property int rows: Math.max(1, Math.ceil(itemCount / Math.max(1, columns))) - // Add 2*gap margins around the grid + // Static fallback sizes preferredWidth: (columns * cellSize) + ((columns - 1) * innerSpacing) + (2 * outerPadding) preferredHeight: (rows * cellSize) + ((rows - 1) * innerSpacing) + (2 * outerPadding) @@ -120,6 +120,10 @@ SmartPanel { panelContent: Item { id: content + // Dynamic content sizing that SmartPanel will watch for changes + property real contentPreferredWidth: (root.columns * root.cellSize) + ((root.columns - 1) * root.innerSpacing) + (2 * root.outerPadding) + property real contentPreferredHeight: (root.rows * root.cellSize) + ((root.rows - 1) * root.innerSpacing) + (2 * root.outerPadding) + Grid { id: grid anchors.fill: parent From f15e900a214c4e6cc7ac9a4a91dd13be818bb94d Mon Sep 17 00:00:00 2001 From: ItsLemmy Date: Wed, 12 Nov 2025 09:11:49 -0500 Subject: [PATCH 6/7] Default settings update --- Assets/settings-default.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Assets/settings-default.json b/Assets/settings-default.json index 94b3dfe2..da203856 100644 --- a/Assets/settings-default.json +++ b/Assets/settings-default.json @@ -213,7 +213,8 @@ "respectExpireTimeout": false, "lowUrgencyDuration": 3, "normalUrgencyDuration": 8, - "criticalUrgencyDuration": 15 + "criticalUrgencyDuration": 15, + "enableKeyboardLayoutToast": true }, "osd": { "enabled": true, From 9215df3fcb3681640e91303cc1912dd3beec92e0 Mon Sep 17 00:00:00 2001 From: ItsLemmy Date: Wed, 12 Nov 2025 09:12:04 -0500 Subject: [PATCH 7/7] Tray: Close drawer when a tray item is actioned. --- Modules/Bar/Extras/TrayMenu.qml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Modules/Bar/Extras/TrayMenu.qml b/Modules/Bar/Extras/TrayMenu.qml index 469f4cce..b6940e88 100644 --- a/Modules/Bar/Extras/TrayMenu.qml +++ b/Modules/Bar/Extras/TrayMenu.qml @@ -206,6 +206,14 @@ PopupWindow { if (modelData && !modelData.isSeparator && !modelData.hasChildren) { modelData.triggered() root.hideMenu() + + // Close the drawer if it's open + if (screen) { + const panel = PanelService.getPanel("trayDrawerPanel", screen) + if (panel && panel.visible) { + panel.close() + } + } } }