Price display: station sign drops the £ (134.9) — matches roadside signs; pounds & pence uses forecourt superscript style £1.29⁹/L (small superscript third digit, small /L); attributed Text on list/widgets/Live Activity, Unicode superscript in Siri cards

This commit is contained in:
FuelBoard Contributor
2026-08-14 18:14:10 +01:00
parent fd7fa5f9c9
commit 80113456ae
7 changed files with 76 additions and 33 deletions
@@ -70,8 +70,7 @@ private struct FuelBoardLiveActivityView: View {
// RIGHT price
VStack(alignment: .trailing, spacing: 2) {
Text(context.state.priceText)
.font(.title2.bold().monospacedDigit())
FuelStore.priceTextAttributed(context.state.pricePence, size: 22, weight: .bold)
Text("Tap for directions")
.font(.caption2)
.foregroundStyle(.secondary)
@@ -87,8 +86,7 @@ private struct FuelBoardLiveActivityPriceView: View {
let context: ActivityViewContext<FuelBoardLiveActivityAttributes>
var body: some View {
Text(context.state.priceText)
.font(.headline.bold().monospacedDigit())
FuelStore.priceTextAttributed(context.state.pricePence, size: 17, weight: .bold)
}
}
@@ -128,7 +126,7 @@ extension FuelBoardLiveActivityAttributes.ContentState {
}
/// Price string from pence, in the user's chosen display style
/// (station sign "£129.9" or pounds "£1.299").
/// (station sign "129.9" or pounds "£1.29/L").
var priceText: String {
FuelStore.priceText(pricePence)
}