From be4ee154850b4618ed52c91e55fbb87a94a3d7a6 Mon Sep 17 00:00:00 2001 From: Raz Date: Wed, 2 Oct 2024 10:42:20 +0200 Subject: [PATCH] fix line limit --- .../Views/Tournament/Shared/TournamentCellView.swift | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/PadelClub/Views/Tournament/Shared/TournamentCellView.swift b/PadelClub/Views/Tournament/Shared/TournamentCellView.swift index 06c6ce2..be746d3 100644 --- a/PadelClub/Views/Tournament/Shared/TournamentCellView.swift +++ b/PadelClub/Views/Tournament/Shared/TournamentCellView.swift @@ -77,7 +77,9 @@ struct TournamentCellView: View { VStack(alignment: .leading, spacing: 0.0) { if let tournament = tournament as? Tournament { HStack { - Text(tournament.locationLabel(displayStyle)).lineLimit(1) + Text(tournament.locationLabel(displayStyle)) + .lineLimit(1) + .truncationMode(.tail) .font(.caption) Spacer() if tournament.isPrivate { @@ -96,6 +98,8 @@ struct TournamentCellView: View { HStack(alignment: .bottom) { Text(tournament.tournamentTitle(displayStyle, forBuild: build)) .fontWeight(.semibold) + .lineLimit(1) + .truncationMode(.tail) if displayStyle == .wide, tournament.displayAgeAndCategory(forBuild: build) { VStack(alignment: .leading, spacing: 0) { Text(build.category.localizedLabel()) @@ -132,7 +136,9 @@ struct TournamentCellView: View { VStack(alignment: .leading) { let sub = tournament.subtitleLabel(forBuild: build) if sub.isEmpty == false { - Text(sub).lineLimit(1) + Text(sub) + .lineLimit(1) + .truncationMode(.tail) } Text(tournament.durationLabel()) }