Anchor circle — pull zone floats above ring via overlay, no layout shift
Pull zone is now an .overlay(alignment: .top) offset upward by its own height, so it appears above the ring without pushing it down. Removed the ring's offset(y:) so it stays perfectly fixed while pulling. Co-Authored-By: Kutesir <kutesir@provoc.ug> Co-Authored-By: Sentry <sentry@provoc.ug>
This commit is contained in:
@@ -644,8 +644,6 @@ struct BackupView: View {
|
||||
|
||||
private var circleSection: some View {
|
||||
VStack(spacing: 0) {
|
||||
pullZone
|
||||
|
||||
ZStack {
|
||||
// Ripple expands outward on backup trigger
|
||||
Circle()
|
||||
@@ -657,8 +655,6 @@ struct BackupView: View {
|
||||
|
||||
ringHero
|
||||
}
|
||||
.offset(y: min(pullProgress * 0.26, 14))
|
||||
.animation(.spring(response: 0.38, dampingFraction: 0.8), value: pullProgress)
|
||||
.gesture(pullGesture)
|
||||
.padding(.bottom, 4)
|
||||
|
||||
@@ -670,6 +666,11 @@ struct BackupView: View {
|
||||
.padding(.horizontal, AppTheme.hPad)
|
||||
.padding(.bottom, 20)
|
||||
}
|
||||
// Pull zone floats above the ring without affecting its layout position
|
||||
.overlay(alignment: .top) {
|
||||
pullZone
|
||||
.offset(y: -max(0, pullProgress * 0.52))
|
||||
}
|
||||
}
|
||||
|
||||
private var pullZone: some View {
|
||||
|
||||
Reference in New Issue
Block a user