From 28f1743ebfc047f81b66487e836b814725320523 Mon Sep 17 00:00:00 2001 From: shannon Date: Thu, 7 Nov 2024 10:05:37 -0500 Subject: [PATCH] Fix truncated message text in some situations Reduce stack view spacing and allow font to scale down. Related to iOS-252 --- Mastodon/Scene/Donation/DonationViewController.swift | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Mastodon/Scene/Donation/DonationViewController.swift b/Mastodon/Scene/Donation/DonationViewController.swift index c79ee65a6..7184361a2 100644 --- a/Mastodon/Scene/Donation/DonationViewController.swift +++ b/Mastodon/Scene/Donation/DonationViewController.swift @@ -68,7 +68,7 @@ struct DonationView: View { var body: some View { HStack { Spacer() - VStack(spacing: 30) { + VStack(spacing: 25) { topMessage frequencyPicker amountEntry @@ -81,7 +81,14 @@ struct DonationView: View { } @ViewBuilder var topMessage: some View { - Text(campaign.donationMessage) + GeometryReader { geom in + Text(campaign.donationMessage) + .frame(height: geom.size.height) + .allowsTightening(true) + .lineLimit(3) + .scaledToFit() + .minimumScaleFactor(0.7) + } } @ViewBuilder var frequencyPicker: some View {