mirror of
https://github.com/FBukovina/Atoll.git
synced 2026-10-27 15:14:33 +00:00
Updated Battery Icon to Macbook Icon
This commit is contained in:
parent
7e31286ae3
commit
27e3ec9ffd
5 changed files with 30 additions and 6 deletions
|
|
@ -158,12 +158,13 @@ struct LockScreenWeatherWidget: View {
|
|||
|
||||
private func circularBatterySegment(for info: LockScreenWeatherSnapshot.BatteryInfo) -> some View {
|
||||
let level = clampedBatteryLevel(info.batteryLevel)
|
||||
let symbolName = info.usesLaptopSymbol ? "laptopcomputer" : batteryIconName(for: level)
|
||||
|
||||
return VStack(spacing: 6) {
|
||||
Gauge(value: Double(level), in: 0...100) {
|
||||
EmptyView()
|
||||
} currentValueLabel: {
|
||||
Image(systemName: batteryIconName(for: level))
|
||||
Image(systemName: symbolName)
|
||||
.font(.system(size: 20, weight: .semibold))
|
||||
.foregroundStyle(Color.white)
|
||||
} minimumValueLabel: {
|
||||
|
|
|
|||
|
|
@ -191,6 +191,7 @@ struct GeneralSettings: View {
|
|||
@Default(.lockScreenWeatherAQIScale) var lockScreenWeatherAQIScale
|
||||
@Default(.lockScreenWeatherUsesGaugeTint) var lockScreenWeatherUsesGaugeTint
|
||||
@Default(.lockScreenWeatherProviderSource) var lockScreenWeatherProviderSource
|
||||
@Default(.lockScreenWeatherBatteryUsesLaptopSymbol) var lockScreenWeatherBatteryUsesLaptopSymbol
|
||||
|
||||
var body: some View {
|
||||
Form {
|
||||
|
|
@ -403,6 +404,15 @@ struct GeneralSettings: View {
|
|||
Defaults.Toggle("Show charging percentage", key: .lockScreenWeatherShowsChargingPercentage)
|
||||
}
|
||||
Defaults.Toggle("Show battery indicator", key: .lockScreenWeatherShowsBatteryGauge)
|
||||
if lockScreenWeatherShowsBatteryGauge {
|
||||
Defaults.Toggle("Use MacBook icon when on battery", key: .lockScreenWeatherBatteryUsesLaptopSymbol)
|
||||
.disabled(lockScreenWeatherWidgetStyle != .circular)
|
||||
if lockScreenWeatherWidgetStyle != .circular {
|
||||
Text("MacBook icon is available in the circular layout.")
|
||||
.font(.caption)
|
||||
.foregroundStyle(.secondary)
|
||||
}
|
||||
}
|
||||
Defaults.Toggle("Show Bluetooth battery", key: .lockScreenWeatherShowsBluetooth)
|
||||
Defaults.Toggle("Show AQI widget", key: .lockScreenWeatherShowsAQI)
|
||||
.disabled(!lockScreenWeatherProviderSource.supportsAirQuality)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue