Enable scrolling in ConnectionView for narrow windows

Wraps the connection form in a ScrollView to improve usability on small screens, landscape orientation, and when accessibility text sizes are increased. The scroll bounce behavior is intelligently set based on content size.
This commit is contained in:
noppe 2025-06-23 10:35:17 +09:00 committed by GitHub
parent fce126cf5d
commit e52c15085d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -15,11 +15,7 @@ struct ConnectionView: View {
var body: some View {
NavigationStack {
ZStack {
// Background
Theme.Colors.terminalBackground
.ignoresSafeArea()
ScrollView {
// Content
VStack(spacing: Theme.Spacing.extraExtraLarge) {
// Logo and Title
@ -83,7 +79,13 @@ struct ConnectionView: View {
}
.padding()
}
.scrollBounceBehavior(.basedOnSize)
.toolbar(.hidden, for: .navigationBar)
.background {
// Background
Theme.Colors.terminalBackground
.ignoresSafeArea()
}
}
.navigationViewStyle(StackNavigationViewStyle())
.preferredColorScheme(.dark)