From cead5d6940c7b8c412637b135d7aa559fb2aa20f Mon Sep 17 00:00:00 2001 From: Federico Imberti <66013290+FI-153@users.noreply.github.com> Date: Tue, 6 Jan 2026 10:28:27 +0100 Subject: [PATCH] Moved settings for the battery widget to dedicated Section Before they were all within the Weather Widget settings --- DynamicIsland/Localizable.xcstrings | 6 +++ .../components/Settings/SettingsView.swift | 44 +++++++++++-------- 2 files changed, 31 insertions(+), 19 deletions(-) diff --git a/DynamicIsland/Localizable.xcstrings b/DynamicIsland/Localizable.xcstrings index 459d989..f098d79 100644 --- a/DynamicIsland/Localizable.xcstrings +++ b/DynamicIsland/Localizable.xcstrings @@ -3989,6 +3989,9 @@ } } } + }, + "Battery Widget" : { + }, "Behavior & Style" : { @@ -8239,6 +8242,9 @@ }, "Enable stats monitoring in Settings to view system performance data." : { + }, + "Enable the battery capsule and configure its layout" : { + }, "Enable the timer feature in Settings to access this tab." : { "comment" : "A message explaining that the timer feature must be enabled in settings to access this tab.", diff --git a/DynamicIsland/components/Settings/SettingsView.swift b/DynamicIsland/components/Settings/SettingsView.swift index 59de231..170aa8e 100644 --- a/DynamicIsland/components/Settings/SettingsView.swift +++ b/DynamicIsland/components/Settings/SettingsView.swift @@ -3195,29 +3195,10 @@ struct LockScreenSettings: View { .disabled(lockScreenWeatherWidgetStyle == .circular) .settingsHighlight(id: highlightID("Show location label")) - Defaults.Toggle("Show charging status", key: .lockScreenWeatherShowsCharging) - .settingsHighlight(id: highlightID("Show charging status")) - - if lockScreenWeatherShowsCharging { - Defaults.Toggle("Show charging percentage", key: .lockScreenWeatherShowsChargingPercentage) - .settingsHighlight(id: highlightID("Show charging percentage")) - } - Defaults.Toggle("Show sunrise time", key: .lockScreenWeatherShowsSunrise) .disabled(lockScreenWeatherWidgetStyle != .inline) .settingsHighlight(id: highlightID("Show sunrise time")) - Defaults.Toggle("Show battery indicator", key: .lockScreenWeatherShowsBatteryGauge) - .settingsHighlight(id: highlightID("Show battery indicator")) - - if lockScreenWeatherShowsBatteryGauge { - Defaults.Toggle("Use MacBook icon when on battery", key: .lockScreenWeatherBatteryUsesLaptopSymbol) - .settingsHighlight(id: highlightID("Use MacBook icon when on battery")) - } - - Defaults.Toggle("Show Bluetooth battery", key: .lockScreenWeatherShowsBluetooth) - .settingsHighlight(id: highlightID("Show Bluetooth battery")) - Defaults.Toggle("Show AQI widget", key: .lockScreenWeatherShowsAQI) .disabled(!lockScreenWeatherProviderSource.supportsAirQuality) .settingsHighlight(id: highlightID("Show AQI widget")) @@ -3246,6 +3227,31 @@ struct LockScreenSettings: View { } footer: { Text("Enable the weather capsule and configure its layout, provider, units, and optional battery/AQI indicators.") } + + Section { + Defaults.Toggle("Show battery indicator", key: .lockScreenWeatherShowsBatteryGauge) + .settingsHighlight(id: highlightID("Show battery indicator")) + + if lockScreenWeatherShowsBatteryGauge { + Defaults.Toggle("Use MacBook icon when on battery", key: .lockScreenWeatherBatteryUsesLaptopSymbol) + .settingsHighlight(id: highlightID("Use MacBook icon when on battery")) + } + + Defaults.Toggle("Show charging status", key: .lockScreenWeatherShowsCharging) + .settingsHighlight(id: highlightID("Show charging status")) + + if lockScreenWeatherShowsCharging { + Defaults.Toggle("Show charging percentage", key: .lockScreenWeatherShowsChargingPercentage) + .settingsHighlight(id: highlightID("Show charging percentage")) + } + + Defaults.Toggle("Show Bluetooth battery", key: .lockScreenWeatherShowsBluetooth) + .settingsHighlight(id: highlightID("Show Bluetooth battery")) + } header: { + Text("Battery Widget") + } footer: { + Text("Enable the battery capsule and configure its layout") + } Section { Defaults.Toggle("Show focus widget", key: .enableLockScreenFocusWidget)