iOS: improve mini player progress indicator to wrap around pill shape

- Changed progress bar from RoundedRectangle to Capsule for rounded ends
- Added horizontal padding so indicator wraps nicely around bottom corners
- Progress bar now feels like an integrated part of the pill-shaped mini player
This commit is contained in:
Admin
2026-03-08 13:40:53 +05:00
parent c35f099f50
commit 71ba882858

View File

@@ -119,24 +119,25 @@ struct MiniPlayerView: View {
.fill(Color.black.opacity(0.3))
)
// Progress indicator as bottom border
// Progress indicator - wraps around bottom corners of pill
GeometryReader { geo in
VStack {
Spacer()
ZStack(alignment: .leading) {
// Background track
RoundedRectangle(cornerRadius: 1)
// Background track - rounded to match pill shape
Capsule()
.fill(Color.white.opacity(0.2))
.frame(height: 3)
// Progress fill
RoundedRectangle(cornerRadius: 1)
// Progress fill - rounded to match pill shape
Capsule()
.fill(Color.amber)
.frame(width: geo.size.width * progress, height: 3)
.frame(width: max(3, geo.size.width * progress), height: 3)
}
.padding(.horizontal, 4) // Inset slightly from edges so it wraps nicely
}
}
.padding(.bottom, 0)
.padding(.bottom, 2)
}
)
.frame(height: 80)