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:
@@ -47,19 +47,13 @@ struct GameRow: View {
|
||||
.lineLimit(1)
|
||||
.fixedSize()
|
||||
|
||||
if showScore {
|
||||
Text(scoreText)
|
||||
Text(showScore ? scoreText : "- : -")
|
||||
.font(.title3.monospacedDigit())
|
||||
.fontWeight(.bold)
|
||||
.foregroundStyle(.primary)
|
||||
.foregroundStyle(.secondary)
|
||||
.lineLimit(1)
|
||||
.fixedSize()
|
||||
.padding(.horizontal, 2)
|
||||
} else {
|
||||
Text("@")
|
||||
.font(.title3)
|
||||
.foregroundStyle(.tertiary)
|
||||
}
|
||||
|
||||
Text(game.homeTeam.abbrev)
|
||||
.font(.title3.monospaced())
|
||||
@@ -108,7 +102,7 @@ struct GameRow: View {
|
||||
private var scoreText: String {
|
||||
let a = game.awayTeam.score ?? 0
|
||||
let h = game.homeTeam.score ?? 0
|
||||
return "\(a)–\(h)"
|
||||
return "\(a) : \(h)"
|
||||
}
|
||||
|
||||
private func open() {
|
||||
|
||||
Reference in New Issue
Block a user