fix: speed pill and feedback in same VStack — no more guessing position
Speed pill and feedback button were in separate VStacks with independent absolute padding, causing misalignment. Now they share one VStack with .padding(.bottom, 70) at the container level. The speed pill sits directly above the tab bar area, positioned relative to the same anchor as all other bottom controls. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -73,23 +73,12 @@ struct MainTabView: View {
|
|||||||
.tint(Color.accentWarm)
|
.tint(Color.accentWarm)
|
||||||
.tabBarMinimizeBehavior(.onScrollDown)
|
.tabBarMinimizeBehavior(.onScrollDown)
|
||||||
|
|
||||||
// Feedback button (not on Reader)
|
// Bottom floating controls
|
||||||
if selectedTab != 2 {
|
VStack(spacing: 10) {
|
||||||
VStack {
|
Spacer()
|
||||||
Spacer()
|
|
||||||
HStack {
|
|
||||||
FeedbackButton()
|
|
||||||
.padding(.leading, 20)
|
|
||||||
Spacer()
|
|
||||||
}
|
|
||||||
.padding(.bottom, 70)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Auto-scroll speed controls (overlay when playing on Reader)
|
// Speed pill (only when auto-scrolling on Reader)
|
||||||
if isAutoScrolling && selectedTab == 2 {
|
if isAutoScrolling && selectedTab == 2 {
|
||||||
VStack {
|
|
||||||
Spacer()
|
|
||||||
HStack(spacing: 12) {
|
HStack(spacing: 12) {
|
||||||
Button {
|
Button {
|
||||||
scrollSpeed = max(0.25, scrollSpeed - 0.25)
|
scrollSpeed = max(0.25, scrollSpeed - 0.25)
|
||||||
@@ -117,11 +106,20 @@ struct MainTabView: View {
|
|||||||
.padding(.vertical, 10)
|
.padding(.vertical, 10)
|
||||||
.background(.regularMaterial, in: Capsule())
|
.background(.regularMaterial, in: Capsule())
|
||||||
.shadow(color: .black.opacity(0.15), radius: 12, y: 4)
|
.shadow(color: .black.opacity(0.15), radius: 12, y: 4)
|
||||||
.padding(.bottom, 50)
|
|
||||||
.transition(.move(edge: .bottom).combined(with: .opacity))
|
.transition(.move(edge: .bottom).combined(with: .opacity))
|
||||||
}
|
}
|
||||||
.animation(.spring(duration: 0.3), value: isAutoScrolling)
|
|
||||||
|
// Feedback button (not on Reader)
|
||||||
|
if selectedTab != 2 {
|
||||||
|
HStack {
|
||||||
|
FeedbackButton()
|
||||||
|
.padding(.leading, 20)
|
||||||
|
Spacer()
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
.padding(.bottom, 70)
|
||||||
|
.animation(.spring(duration: 0.3), value: isAutoScrolling)
|
||||||
}
|
}
|
||||||
.confettiCannon(
|
.confettiCannon(
|
||||||
trigger: $confettiTrigger,
|
trigger: $confettiTrigger,
|
||||||
|
|||||||
Reference in New Issue
Block a user