feat(store): stretch cover image on pull-down overscroll
- Remove max(0) clamp in ScrollOffsetReader to allow negative values during bounce - Add stretchAmount computed var (max(0, -scrollOffset)) - Hero image frame grows by stretchAmount and offsets upward on overscroll - isCategoryTabsPinned still uses max(0, scrollOffset) via >= check
This commit is contained in:
@@ -26,7 +26,7 @@ extension StoreDetailView {
|
||||
var heroSection: some View {
|
||||
ZStack(alignment: .top) {
|
||||
AsyncStoreImage(imageURL: resolvedURL(storeCoverURL))
|
||||
.frame(height: topSectionHeight)
|
||||
.frame(height: topSectionHeight + stretchAmount)
|
||||
.overlay(
|
||||
LinearGradient(
|
||||
colors: [Color.black.opacity(0.32), Color.black.opacity(0.05)],
|
||||
@@ -34,6 +34,7 @@ extension StoreDetailView {
|
||||
endPoint: .bottom
|
||||
)
|
||||
)
|
||||
.offset(y: -stretchAmount)
|
||||
.ignoresSafeArea(.container, edges: .top)
|
||||
|
||||
VStack(spacing: 0) {
|
||||
|
||||
Reference in New Issue
Block a user