diff --git a/FuelBoard/FuelSavingsViews.swift b/FuelBoard/FuelSavingsViews.swift index 1d746bd..b8b6b11 100644 --- a/FuelBoard/FuelSavingsViews.swift +++ b/FuelBoard/FuelSavingsViews.swift @@ -107,16 +107,19 @@ struct FuelSavingsSummaryView: View { // break even, blue baseline. lineLimit + minimumScaleFactor keep // it to one line, so rows stay even. VStack(alignment: .leading, spacing: 2) { - HStack(alignment: .firstTextBaseline, spacing: 6) { - capsule(for: result, compact: true) - .accessibilityLabel(accessibilityHeadline(for: result)) - Text(comparisonLabel(for: result)) - .font(.caption2) - .foregroundStyle(.secondary) - .lineLimit(1) - .layoutPriority(1) - .accessibilityLabel("Comparison: \(comparisonLabel(for: result))") - } + // The capsule gets the WHOLE line and the comparison caption + // sits beneath it. Side by side, the caption's layoutPriority + // squeezed the verdict until it truncated ("Approx. £2.75 + // better off after tra…"), and in this sort mode the verdict + // is the point of the row. + capsule(for: result, compact: true) + .accessibilityLabel(accessibilityHeadline(for: result)) + Text(comparisonLabel(for: result)) + .font(.caption2) + .foregroundStyle(.secondary) + .lineLimit(1) + .minimumScaleFactor(0.85) + .accessibilityLabel("Comparison: \(comparisonLabel(for: result))") if let warning = priceWarning ?? priceConfidence.warningText { Text(warning) .font(.caption2) @@ -281,6 +284,10 @@ struct FuelSavingsSummaryView: View { .accessibilityHidden(true) Text(result.capsuleHeadline()) .lineLimit(1) + // Belt and braces: now that the capsule owns its line it has no + // rival for width, and shrinking beats truncating at large + // Dynamic Type sizes. + .minimumScaleFactor(0.8) } .font(compact ? .caption.weight(.semibold) : .headline) .foregroundStyle(capsuleColor(for: result.status))