Moved settings for the battery widget to dedicated Section

Before they were all within the Weather Widget settings
This commit is contained in:
Federico Imberti 2026-01-06 10:28:27 +01:00
commit cead5d6940
2 changed files with 31 additions and 19 deletions

View file

@ -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.",

View file

@ -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)