Favourites tab: fuel-type selector gets the same coloured pump icons

- FuelTypeSegmentedPicker promoted to shared (was private in StationsView)
  and parameterised by fuel list so Favourites passes only fuels with favourites
- Favourites tab swaps native .segmented picker for the capsule control with
  green/purple/grey fuelpump icons, matching Stations
This commit is contained in:
FuelBoard Contributor
2026-08-12 23:03:35 +01:00
parent 0fef9870cb
commit c2a9943d4c
2 changed files with 12 additions and 10 deletions
+4 -6
View File
@@ -84,12 +84,10 @@ struct FavouritesView: View {
}
} else {
Section("Fuel type") {
Picker("Fuel type", selection: $fuel) {
ForEach(availableFuels) { fuel in
Text(fuel.shortName).tag(fuel)
}
}
.pickerStyle(.segmented)
FuelTypeSegmentedPicker(
selection: $fuel,
fuels: availableFuels
)
}
Section("\(activeFuel.displayName) favourites — cheapest first") {