Fix tvOS onboarding background transparency and button styling

Add opaque black background to onboarding on tvOS to prevent Home
screen content from leaking through the fullScreenCover. Replace
toolbar Skip button with plain overlay button to avoid blurred
material style, and add tvOS card button style with default focus
on Continue button.
This commit is contained in:
Arkadiusz Fal
2026-02-14 16:10:45 +01:00
parent 942f7da090
commit 08c544d161
2 changed files with 28 additions and 0 deletions

View File

@@ -63,7 +63,19 @@ struct OnboardingSheetView: View {
#elseif os(iOS)
.tabViewStyle(.page(indexDisplayMode: .never))
#endif
#if os(tvOS)
.background(Color.black.ignoresSafeArea())
.overlay(alignment: .topLeading) {
Button(String(localized: "onboarding.skip")) {
completeOnboarding()
}
.buttonStyle(.plain)
.foregroundStyle(.secondary)
.padding(40)
}
#endif
.interactiveDismissDisabled()
#if !os(tvOS)
.toolbar {
ToolbarItem(placement: .cancellationAction) {
Button(String(localized: "onboarding.skip")) {
@@ -71,6 +83,7 @@ struct OnboardingSheetView: View {
}
}
}
#endif
.task {
guard !hasCheckedLegacyData else { return }
hasCheckedLegacyData = true