diff --git a/Modules/Panels/Settings/Tabs/ColorScheme/ColorsSubTab.qml b/Modules/Panels/Settings/Tabs/ColorScheme/ColorsSubTab.qml index 37891d1f4..7f09e4edb 100644 --- a/Modules/Panels/Settings/Tabs/ColorScheme/ColorsSubTab.qml +++ b/Modules/Panels/Settings/Tabs/ColorScheme/ColorsSubTab.qml @@ -122,10 +122,11 @@ ColumnLayout { label: I18n.tr("panels.color-scheme.sync-gsettings-label") description: I18n.tr("panels.color-scheme.sync-gsettings-description") checked: Settings.data.colorSchemes.syncGsettings + defaultValue: Settings.getDefaultValue("colorSchemes.syncGsettings") onToggled: checked => { Settings.data.colorSchemes.syncGsettings = checked; if (checked) - ColorSchemeService.pushSystemColorScheme(); + ColorSchemeService.pushSystemColorScheme(true); } } @@ -149,6 +150,7 @@ ColumnLayout { ] currentKey: Settings.data.colorSchemes.schedulingMode + defaultValue: Settings.getDefaultValue("colorSchemes.schedulingMode") onSelected: key => { Settings.data.colorSchemes.schedulingMode = key; @@ -211,6 +213,7 @@ ColumnLayout { label: I18n.tr("panels.color-scheme.color-source-use-wallpaper-colors-label") description: I18n.tr("panels.color-scheme.color-source-use-wallpaper-colors-description") checked: Settings.data.colorSchemes.useWallpaperColors + defaultValue: Settings.getDefaultValue("colorSchemes.useWallpaperColors") onToggled: checked => { Settings.data.colorSchemes.useWallpaperColors = checked; if (checked) { @@ -249,7 +252,6 @@ ColumnLayout { Settings.data.colorSchemes.monitorForColors = key; AppThemeService.generate(); } - defaultValue: "" } NComboBox { diff --git a/Modules/Panels/Settings/Tabs/Connections/WifiSubTab.qml b/Modules/Panels/Settings/Tabs/Connections/WifiSubTab.qml index 5cfebb193..3d59fbb74 100644 --- a/Modules/Panels/Settings/Tabs/Connections/WifiSubTab.qml +++ b/Modules/Panels/Settings/Tabs/Connections/WifiSubTab.qml @@ -148,8 +148,8 @@ Item { label: I18n.tr("common.wifi") icon: NetworkService.wifiEnabled ? "wifi" : "wifi-off" checked: NetworkService.wifiEnabled - onToggled: checked => NetworkService.setWifiEnabled(checked) enabled: !NetworkService.airplaneModeEnabled && NetworkService.wifiAvailable + onToggled: checked => NetworkService.setWifiEnabled(checked) Layout.alignment: Qt.AlignVCenter } } @@ -324,7 +324,7 @@ Item { // Airplane Mode NBox { id: miscSettingsBox - visible: !root.showOnlyLists && miscSettingsCol.visibleChildren.length > 0 + visible: !root.showOnlyLists && NetworkService.wifiAvailable && BluetoothService.bluetoothAvailable Layout.fillWidth: true Layout.preferredHeight: miscSettingsCol.implicitHeight + Style.margin2XL color: Color.mSurface diff --git a/Modules/Panels/Wallpaper/WallpaperPanel.qml b/Modules/Panels/Wallpaper/WallpaperPanel.qml index a183fdce2..b22746c8f 100644 --- a/Modules/Panels/Wallpaper/WallpaperPanel.qml +++ b/Modules/Panels/Wallpaper/WallpaperPanel.qml @@ -298,8 +298,8 @@ SmartPanel { NIconButton { visible: Settings.data.wallpaper.enabled - icon: "sun" - tooltipText: Settings.data.wallpaper.linkLightAndDarkWallpapers ? I18n.tr("wallpaper.panel.header-sun-linked-tooltip") : I18n.tr("wallpaper.panel.header-sun-separate-tooltip") + icon: "dark-mode" + tooltipText: Settings.data.wallpaper.linkLightAndDarkWallpapers ? I18n.tr("wallpaper.panel.header-separate-light-dark-tooltip") : I18n.tr("wallpaper.panel.header-link-light-dark-tooltip") baseSize: Style.baseWidgetSize * 0.8 colorBg: !Settings.data.wallpaper.linkLightAndDarkWallpapers ? Color.mPrimary : Color.smartAlpha(Color.mSurfaceVariant) colorFg: !Settings.data.wallpaper.linkLightAndDarkWallpapers ? Color.mOnPrimary : Color.mPrimary diff --git a/Services/Networking/BluetoothService.qml b/Services/Networking/BluetoothService.qml index 563591861..9146763dd 100644 --- a/Services/Networking/BluetoothService.qml +++ b/Services/Networking/BluetoothService.qml @@ -71,11 +71,10 @@ Singleton { } } - // Handle system wakeup to force-poll and ensure state is up-to-date + // Handle potential case where Quickshell doesnt't properly update adapter after system wakeup Connections { target: Time function onResumed() { - Logger.i("Bluetooth", "System resumed - forcing state poll"); ctlPollTimer.restart(); } } @@ -90,7 +89,7 @@ Singleton { checkAirplaneMode(); } function onEnabledChanged() { - if (adapter && adapter.enabled && Settings.data.network.bluetoothAutoConnect) { + if (adapter?.enabled && Settings.data.network.bluetoothAutoConnect) { autoConnectTimer.restart(); } } @@ -99,7 +98,7 @@ Singleton { Connections { target: Settings.data.network function onBluetoothAutoConnectChanged() { - if (Settings.data.network.bluetoothAutoConnect && adapter && adapter.enabled) { + if (Settings.data.network.bluetoothAutoConnect && adapter?.enabled) { autoConnectTimer.restart(); } else { autoConnectTimer.stop(); @@ -137,7 +136,7 @@ Singleton { Timer { id: ctlPollTimer - interval: 250 + interval: 2000 running: false onTriggered: { if (!adapter || !ProgramCheckerService.bluetoothctlAvailable) { diff --git a/Services/Networking/NetworkService.qml b/Services/Networking/NetworkService.qml index 8f1f106b2..685bdd946 100644 --- a/Services/Networking/NetworkService.qml +++ b/Services/Networking/NetworkService.qml @@ -114,7 +114,7 @@ Singleton { Component.onCompleted: { Logger.i("Network", "Service started"); - wifiInitTimer.running = true; + wifiInitTimer.restart(); // Ensure initial detection if nmcli is already available at startup if (ProgramCheckerService.nmcliAvailable) { @@ -155,23 +155,6 @@ Singleton { } return; } - var isAirplaneModeActive = !root.wifiEnabled && BluetoothService.blocked; - // Extra check for Airplane Mode if Bluetooth has been blocked before Wi-Fi - if (isAirplaneModeActive && !root.airplaneModeEnabled) { - root.airplaneModeEnabled = true; - ToastService.showNotice(I18n.tr("toast.airplane-mode.title"), I18n.tr("common.enabled"), "plane"); - Logger.i("AirplaneMode", "Enabled"); - root.networks = ({}); - return; - } - // Extra check for Airplane Mode if Wi-Fi has been unblocked before Bluetooth - if (!isAirplaneModeActive && root.airplaneModeEnabled) { - root.airplaneModeEnabled = false; - ToastService.showNotice(I18n.tr("toast.airplane-mode.title"), I18n.tr("common.disabled"), "plane-off"); - Logger.i("AirplaneMode", "Disabled"); - scan(); - return; - } if (root.wifiEnabled) { ToastService.showNotice(I18n.tr("common.wifi"), I18n.tr("common.enabled"), "wifi"); scan(); diff --git a/shell.qml b/shell.qml index 9a9b88695..c2e31e6f7 100644 --- a/shell.qml +++ b/shell.qml @@ -124,7 +124,7 @@ ShellRoot { } }); - delayedInitTimer.running = true; + delayedInitTimer.restart(); } Overview {}