Battery widget settings hidden when the widget is disabled

This commit is contained in:
Federico Imberti 2026-01-06 10:30:07 +01:00
commit 73a0c04e91

View file

@ -3235,7 +3235,6 @@ struct LockScreenSettings: View {
if lockScreenWeatherShowsBatteryGauge { if lockScreenWeatherShowsBatteryGauge {
Defaults.Toggle("Use MacBook icon when on battery", key: .lockScreenWeatherBatteryUsesLaptopSymbol) Defaults.Toggle("Use MacBook icon when on battery", key: .lockScreenWeatherBatteryUsesLaptopSymbol)
.settingsHighlight(id: highlightID("Use MacBook icon when on battery")) .settingsHighlight(id: highlightID("Use MacBook icon when on battery"))
}
Defaults.Toggle("Show charging status", key: .lockScreenWeatherShowsCharging) Defaults.Toggle("Show charging status", key: .lockScreenWeatherShowsCharging)
.settingsHighlight(id: highlightID("Show charging status")) .settingsHighlight(id: highlightID("Show charging status"))
@ -3247,10 +3246,11 @@ struct LockScreenSettings: View {
Defaults.Toggle("Show Bluetooth battery", key: .lockScreenWeatherShowsBluetooth) Defaults.Toggle("Show Bluetooth battery", key: .lockScreenWeatherShowsBluetooth)
.settingsHighlight(id: highlightID("Show Bluetooth battery")) .settingsHighlight(id: highlightID("Show Bluetooth battery"))
}
} header: { } header: {
Text("Battery Widget") Text("Battery Widget")
} footer: { } footer: {
Text("Enable the battery capsule and configure its layout") Text("Enable the battery capsule and configure its layout.")
} }
Section { Section {