live activity: tint pump glyph by monitored fuel
Move FuelType.tintColor (green=unleaded #30D158, yellow=premium #FFD60A, cyan=diesel #64D2FF) into Shared/FuelStore.swift so the app, widget, and Live Activity all read one definition (was app-only in StationsView, so the widget couldn't see it). Tint the Live Activity rich card pump icon and the Dynamic Island compactLeading pump by context.state.fuel.tintColor.
This commit is contained in:
@@ -41,7 +41,7 @@ struct FuelBoardLiveActivity: Widget {
|
||||
}
|
||||
} compactLeading: {
|
||||
Image(systemName: "fuelpump.fill")
|
||||
.foregroundStyle(.green)
|
||||
.foregroundStyle(context.state.fuel.tintColor)
|
||||
} compactTrailing: {
|
||||
FuelBoardLiveActivityPriceView(context: context)
|
||||
} minimal: {
|
||||
@@ -95,7 +95,7 @@ private struct FuelBoardLiveActivityView: View {
|
||||
// LEFT — station brand glyph
|
||||
Image(systemName: "fuelpump.circle.fill")
|
||||
.font(.system(size: 32))
|
||||
.foregroundStyle(.green, .white)
|
||||
.foregroundStyle(context.state.fuel.tintColor, .white)
|
||||
.frame(width: 40, height: 40)
|
||||
|
||||
// MIDDLE — fuel + station
|
||||
|
||||
Reference in New Issue
Block a user