Use colon score format and placeholder for upcoming game rows

Game rows now render scores as "2 : 3" (with spaces) in secondary
color so they read as data, not as part of the team-name run.
Pre-game rows show "- : -" in the same slot so tricode columns line
up regardless of whether the game has started — only two-digit scores
push the layout, which doesn't happen in NHL play.
This commit is contained in:
2026-04-25 15:26:25 -04:00
parent f6785321f4
commit 52ebfc1a6b
+3 -9
View File
@@ -47,19 +47,13 @@ struct GameRow: View {
.lineLimit(1) .lineLimit(1)
.fixedSize() .fixedSize()
if showScore { Text(showScore ? scoreText : "- : -")
Text(scoreText)
.font(.title3.monospacedDigit()) .font(.title3.monospacedDigit())
.fontWeight(.bold) .fontWeight(.bold)
.foregroundStyle(.primary) .foregroundStyle(.secondary)
.lineLimit(1) .lineLimit(1)
.fixedSize() .fixedSize()
.padding(.horizontal, 2) .padding(.horizontal, 2)
} else {
Text("@")
.font(.title3)
.foregroundStyle(.tertiary)
}
Text(game.homeTeam.abbrev) Text(game.homeTeam.abbrev)
.font(.title3.monospaced()) .font(.title3.monospaced())
@@ -108,7 +102,7 @@ struct GameRow: View {
private var scoreText: String { private var scoreText: String {
let a = game.awayTeam.score ?? 0 let a = game.awayTeam.score ?? 0
let h = game.homeTeam.score ?? 0 let h = game.homeTeam.score ?? 0
return "\(a)\(h)" return "\(a) : \(h)"
} }
private func open() { private func open() {