Skip to content

Commit 716b367

Browse files
author
scyc314
committed
scoreboard format and history fixes
1 parent f032fc1 commit 716b367

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

Moblin/VideoEffects/Scoreboard/ScoreboardEffectModularView.swift

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ struct ScoreboardEffectModularView: View {
2424
private func calculateMaxHistory() -> Int {
2525
var maxHistory = 0
2626
for indexPlusOne in 1 ... 5 {
27-
let homeHas = getHistoricScore(team: config.team1, indexPlusOne: indexPlusOne) != nil
28-
let awayHas = getHistoricScore(team: config.team2, indexPlusOne: indexPlusOne) != nil
29-
if homeHas || awayHas {
27+
let homeHas = getHistoricScore(team: config.team1, indexPlusOne: indexPlusOne) ?? ""
28+
let awayHas = getHistoricScore(team: config.team2, indexPlusOne: indexPlusOne) ?? ""
29+
if !homeHas.isEmpty || !awayHas.isEmpty {
3030
maxHistory = indexPlusOne
3131
}
3232
}
@@ -59,7 +59,7 @@ struct ScoreboardEffectModularView: View {
5959
histWidth: histWidth
6060
)
6161
}
62-
.frame(width: CGFloat(modular.width) + CGFloat(maxHistory) * histWidth)
62+
.frame(width: CGFloat(modular.width) + CGFloat(maxHistory - 1) * histWidth)
6363
infoBox()
6464
}
6565
}
@@ -196,7 +196,7 @@ struct ScoreboardEffectModularView: View {
196196
)
197197
}
198198
teamName(team: modularTeam)
199-
.padding(.leading, 3)
199+
.padding(.leading, 8)
200200
.frame(maxWidth: .infinity, alignment: .leading)
201201
possession(show: team.possession)
202202
if modular.layout == .stackedInline {
@@ -274,7 +274,7 @@ struct ScoreboardEffectModularView: View {
274274
fontSize: CGFloat,
275275
width: CGFloat,
276276
gray: Bool,
277-
weight: Font.Weight = .bold
277+
weight: Font.Weight = .heavy
278278
) -> some View {
279279
if !value.isEmpty {
280280
ZStack {
@@ -309,7 +309,7 @@ struct ScoreboardEffectModularView: View {
309309

310310
private func teamName(team: SettingsWidgetModularScoreboardTeam) -> some View {
311311
Text(team.name)
312-
.font(.system(size: fontSize()))
312+
.font(.system(size: fontSize(), weight: .bold))
313313
.bold(modular.isBold)
314314
.lineLimit(1)
315315
.minimumScaleFactor(0.1)

0 commit comments

Comments
 (0)