Fix text truncation in onboarding views

Add .fixedSize(horizontal: false, vertical: true) to prevent
multiline text from being clipped on smaller screens.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
treyt
2026-02-26 20:33:27 -06:00
parent 3a4e60587a
commit 451e6d74f0
4 changed files with 7 additions and 0 deletions

View File

@@ -52,6 +52,7 @@ struct OnboardingDay: View {
.font(.body.weight(.medium)) .font(.body.weight(.medium))
.foregroundColor(.white.opacity(0.85)) .foregroundColor(.white.opacity(0.85))
.multilineTextAlignment(.center) .multilineTextAlignment(.center)
.fixedSize(horizontal: false, vertical: true)
.padding(.horizontal, 40) .padding(.horizontal, 40)
Spacer() Spacer()
@@ -91,6 +92,7 @@ struct OnboardingDay: View {
Text("Tip: \"Today\" works great for evening reminders") Text("Tip: \"Today\" works great for evening reminders")
.font(.subheadline.weight(.medium)) .font(.subheadline.weight(.medium))
.foregroundColor(.white.opacity(0.9)) .foregroundColor(.white.opacity(0.9))
.fixedSize(horizontal: false, vertical: true)
} }
.padding(.horizontal, 30) .padding(.horizontal, 30)
.padding(.bottom, 80) .padding(.bottom, 80)

View File

@@ -38,6 +38,7 @@ struct OnboardingStyle: View {
.font(.body.weight(.medium)) .font(.body.weight(.medium))
.foregroundColor(.white.opacity(0.85)) .foregroundColor(.white.opacity(0.85))
.multilineTextAlignment(.center) .multilineTextAlignment(.center)
.fixedSize(horizontal: false, vertical: true)
.padding(.horizontal, 32) .padding(.horizontal, 32)
.padding(.bottom, 24) .padding(.bottom, 24)
@@ -70,6 +71,7 @@ struct OnboardingStyle: View {
.font(.subheadline) .font(.subheadline)
Text("You can change this anytime in Customize") Text("You can change this anytime in Customize")
.font(.caption.weight(.medium)) .font(.caption.weight(.medium))
.fixedSize(horizontal: false, vertical: true)
} }
.foregroundColor(.white.opacity(0.7)) .foregroundColor(.white.opacity(0.7))
.padding(.top, 24) .padding(.top, 24)

View File

@@ -53,6 +53,7 @@ struct OnboardingTime: View {
.font(.body.weight(.medium)) .font(.body.weight(.medium))
.foregroundColor(.white.opacity(0.85)) .foregroundColor(.white.opacity(0.85))
.multilineTextAlignment(.center) .multilineTextAlignment(.center)
.fixedSize(horizontal: false, vertical: true)
.padding(.horizontal, 40) .padding(.horizontal, 40)
Spacer() Spacer()
@@ -87,6 +88,7 @@ struct OnboardingTime: View {
Text("You'll get a gentle reminder at \(formatter.string(from: onboardingData.date)) every day") Text("You'll get a gentle reminder at \(formatter.string(from: onboardingData.date)) every day")
.font(.subheadline.weight(.medium)) .font(.subheadline.weight(.medium))
.foregroundColor(.white.opacity(0.9)) .foregroundColor(.white.opacity(0.9))
.fixedSize(horizontal: false, vertical: true)
} }
.padding(.horizontal, 30) .padding(.horizontal, 30)
.padding(.bottom, 80) .padding(.bottom, 80)

View File

@@ -48,6 +48,7 @@ struct OnboardingWelcome: View {
.font(.headline.weight(.medium)) .font(.headline.weight(.medium))
.foregroundColor(.white.opacity(0.9)) .foregroundColor(.white.opacity(0.9))
.multilineTextAlignment(.center) .multilineTextAlignment(.center)
.fixedSize(horizontal: false, vertical: true)
.padding(.horizontal, 40) .padding(.horizontal, 40)
Spacer() Spacer()