Siri: full-width Directions row on price card — fixes squashed 2-line button in narrow snippet

This commit is contained in:
FuelBoard Contributor
2026-08-14 14:45:51 +01:00
parent 6d7254ebba
commit b46c09109e
+25 -25
View File
@@ -356,36 +356,36 @@ struct FuelPriceCard: View {
var directionsIntent: OpenDirectionsIntent? = nil var directionsIntent: OpenDirectionsIntent? = nil
var body: some View { var body: some View {
HStack(spacing: 14) { VStack(alignment: .leading, spacing: 10) {
Image(systemName: "fuelpump.fill") HStack(spacing: 14) {
.font(.title2) Image(systemName: "fuelpump.fill")
.foregroundStyle(.tint) .font(.title2)
VStack(alignment: .leading, spacing: 2) { .foregroundStyle(.tint)
Text(stationName) VStack(alignment: .leading, spacing: 2) {
.font(.headline) Text(stationName)
.lineLimit(1) .font(.headline)
Text(distance.isEmpty ? fuelName : "\(fuelName) · \(distance)") .lineLimit(1)
.font(.subheadline) Text(distance.isEmpty ? fuelName : "\(fuelName) · \(distance)")
.foregroundStyle(.secondary) .font(.subheadline)
if !freshness.isEmpty { .foregroundStyle(.secondary)
Text(freshness) if !freshness.isEmpty {
.font(.caption) Text(freshness)
.foregroundStyle(.tertiary) .font(.caption)
.foregroundStyle(.tertiary)
}
} }
} Spacer(minLength: 8)
Spacer(minLength: 8)
VStack(alignment: .trailing, spacing: 6) {
Text(price) Text(price)
.font(.title2.bold()) .font(.title2.bold())
.monospacedDigit() .monospacedDigit()
if let directionsIntent { }
Button(intent: directionsIntent) { if let directionsIntent {
Label("Directions", systemImage: "map.fill") Button(intent: directionsIntent) {
.font(.footnote.weight(.medium)) Label("Directions", systemImage: "map.fill")
} .font(.footnote.weight(.medium))
.buttonStyle(.bordered) .frame(maxWidth: .infinity)
.controlSize(.small)
} }
.buttonStyle(.bordered)
} }
} }
.padding(12) .padding(12)