Move price + RAG delta to second row; name line is name-only full width

This commit is contained in:
FuelBoard Contributor
2026-08-11 15:27:57 +01:00
parent 3da5de6da2
commit d8f635fb41
+13 -16
View File
@@ -210,8 +210,7 @@ struct StationRow: View {
.overlay(Circle().stroke(Color.primary.opacity(0.08), lineWidth: 1))
.shadow(color: .black.opacity(0.08), radius: 2, y: 1)
// Name line fills the whole row width (only the logo is to its
// left); long names wrap instead of being cut off.
// Name fills the whole row width; price + details on the row below.
VStack(alignment: .leading, spacing: 3) {
HStack(alignment: .firstTextBaseline, spacing: 6) {
Text(station.name)
@@ -227,23 +226,21 @@ struct StationRow: View {
.foregroundStyle(.blue)
}
Spacer(minLength: 6)
if let price = station.prices[fuel] {
HStack(spacing: 5) {
Circle()
.fill(ragColor)
.frame(width: 10, height: 10)
Text(String(format: "%.1fp", price))
.font(.title3.bold())
.monospacedDigit()
}
}
}
HStack(spacing: 5) {
if let deltaText {
Text(deltaText)
.font(.caption2.bold())
.foregroundStyle(ragColor)
if let price = station.prices[fuel] {
Circle()
.fill(ragColor)
.frame(width: 10, height: 10)
Text(String(format: "%.1fp", price))
.font(.title3.bold())
.monospacedDigit()
if let deltaText {
Text(deltaText)
.font(.caption2.bold())
.foregroundStyle(ragColor)
}
}
Text("\(station.address), \(station.postcode)")
.font(.caption)