Commit 5a2ad3b532
Unsigned
Layout: unified · split
App/Sources/RocketLineup.swift +5 −3
| @@ -70,20 +70,22 @@ struct RocketLineup: View { | ||
| 70 | 70 | let mine = r.id == highlight |
| 71 | 71 | let h = d.heightM! * scale |
| 72 | 72 | let w = max((d.diameterM ?? 3) * scale, 4) |
| 73 | // Fins reach 0.35 × width past each side, so wide rockets get a wider column. | |
| 74 | let width = max(column, w * 1.7 + 14) | |
| 73 | 75 | return VStack(spacing: 4) { |
| 74 | 76 | Text(String(format: "%.0f m", d.heightM!)).font(.caption2.monospacedDigit()).foregroundStyle(ink.opacity(0.7)) |
| 75 | 77 | .frame(height: top - 4) |
| 76 | 78 | RocketShape() |
| 77 | 79 | .fill(mine ? accent : ink.opacity(0.75)) |
| 78 | 80 | .frame(width: w, height: h) |
| 79 | Rectangle().fill(ink.opacity(0.35)).frame(width: column, height: 0.5) | |
| 81 | Rectangle().fill(ink.opacity(0.35)).frame(width: width, height: 0.5) | |
| 80 | 82 | Text(r.title).font(.caption2.weight(mine ? .semibold : .regular)) |
| 81 | 83 | .foregroundStyle(mine ? accent : ink.opacity(0.85)) |
| 82 | 84 | .multilineTextAlignment(.center) |
| 83 | 85 | .lineLimit(2) |
| 84 | .frame(width: column - 6, height: bottom - 6, alignment: .top) | |
| 86 | .frame(width: width - 6, height: bottom - 6, alignment: .top) | |
| 85 | 87 | } |
| 86 | .frame(width: column) | |
| 88 | .frame(width: width) | |
| 87 | 89 | .contentShape(Rectangle()) |
| 88 | 90 | .accessibilityElement(children: .ignore) |
| 89 | 91 | .accessibilityLabel("\(r.title), \(Int(d.heightM!)) metres") |