Skip to content

Commit

Permalink
allow line limit of 2 for left side text
Browse files Browse the repository at this point in the history
  • Loading branch information
erikng committed Aug 16, 2024
1 parent 091b938 commit 2c509a7
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Nudge/UI/StandardMode/LeftSide.swift
Original file line number Diff line number Diff line change
Expand Up @@ -82,20 +82,22 @@ struct InfoRow: View {
HStack {
Text(label.localized(desiredLanguage: getDesiredLanguage(locale: appState.locale)))
.fontWeight(boldText ? .bold : .regular)
.lineLimit(2)
Spacer()
if isHighlighted {
Text(value)
Text(value.localized(desiredLanguage: getDesiredLanguage(locale: appState.locale)))
.foregroundColor(appState.differentiateWithoutColor ? .accessibleRed : .red)
.fontWeight(.bold)
.minimumScaleFactor(0.01)
.lineLimit(1)
} else {
Text(value)
Text(value.localized(desiredLanguage: getDesiredLanguage(locale: appState.locale)))
.foregroundColor(colorScheme == .light ? .accessibleSecondaryLight : .accessibleSecondaryDark)
.fontWeight(boldText ? .bold : .regular)
.minimumScaleFactor(0.01)
.lineLimit(1)
}
}
.lineLimit(1)
}
}

Expand Down

0 comments on commit 2c509a7

Please sign in to comment.