Unify capsule, station label and price rating styling
One adaptive tone palette and one shape rule now drive every capsule on Stations, Favourites, the detail sheet and the Key. - CapsuleTone: the light/dark palette pairs in one place, resolved through a UIColor dynamic provider so a List row that re-renders without rebuilding its body still follows an appearance switch. Every pair clears 4.5:1 foreground-on-background in both appearances (4.96-6.72:1). - AdaptiveCapsule: capsule at one drawn line, rounded rect at two or more, radius 8 -> 10, measuring content before padding so insets cannot inflate the line count. - Listing verdict capsules move from white-on-muted-solid to the tinted palette, so Saves, Break even, Costs and Closest station read the same in the rows and in the detail sheet. - Best Value is purple, not green: green stays reserved for a financial saving, which is what the Saves capsule beside it means. - Price dots standardise to 12pt in the app (widget keeps its own 6pt dot; PriceRatingDot now takes a diameter so the difference is deliberate). - Station labels are sentence case with their recommended symbols (medal, tag, location.north.fill, trophy) and StationLabelKind replaces the Key's string-literal dispatch, so renaming a label can no longer drop a row. - Key says "Costs", matching the capsule's own headline (was "Costs more").
This commit is contained in:
@@ -516,8 +516,10 @@ struct ContentView: View {
|
||||
.fontWeight(favourite.isCheapest ? .semibold : .regular)
|
||||
.lineLimit(1)
|
||||
if favourite.isCheapest {
|
||||
Text("TOP")
|
||||
.font(.system(size: 9, weight: .bold))
|
||||
// Sentence case, to match every other surface: the watch
|
||||
// row is the same label as the phone's, not a different one.
|
||||
Text("Top")
|
||||
.font(.system(size: 9, weight: .semibold))
|
||||
.padding(.horizontal, 4)
|
||||
.padding(.vertical, 2)
|
||||
.background(fuel.color.opacity(0.18), in: Capsule())
|
||||
|
||||
Reference in New Issue
Block a user