ui: make Featured Trips carousel scroll edge-to-edge
Use contentMargins on horizontal ScrollView so cards start inset but scroll to screen edges. Pad headers and error states individually. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -189,6 +189,7 @@ struct HomeView: View {
|
||||
.foregroundStyle(Theme.warmOrange)
|
||||
}
|
||||
}
|
||||
.padding(.horizontal, Theme.Spacing.md)
|
||||
|
||||
// Horizontal carousel grouped by region
|
||||
ScrollView(.horizontal, showsIndicators: false) {
|
||||
@@ -218,8 +219,8 @@ struct HomeView: View {
|
||||
}
|
||||
}
|
||||
}
|
||||
.padding(.horizontal, 1) // Prevent clipping
|
||||
}
|
||||
.contentMargins(.horizontal, Theme.Spacing.md, for: .scrollContent)
|
||||
}
|
||||
} else if let error = suggestedTripsGenerator.error {
|
||||
// Error state
|
||||
@@ -249,6 +250,7 @@ struct HomeView: View {
|
||||
.background(Theme.cardBackground(colorScheme))
|
||||
.clipShape(RoundedRectangle(cornerRadius: Theme.CornerRadius.medium))
|
||||
}
|
||||
.padding(.horizontal, Theme.Spacing.md)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user