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:
@@ -119,24 +119,25 @@ struct MiniPlayerView: View {
|
|||||||
.fill(Color.black.opacity(0.3))
|
.fill(Color.black.opacity(0.3))
|
||||||
)
|
)
|
||||||
|
|
||||||
// Progress indicator as bottom border
|
// Progress indicator - wraps around bottom corners of pill
|
||||||
GeometryReader { geo in
|
GeometryReader { geo in
|
||||||
VStack {
|
VStack {
|
||||||
Spacer()
|
Spacer()
|
||||||
ZStack(alignment: .leading) {
|
ZStack(alignment: .leading) {
|
||||||
// Background track
|
// Background track - rounded to match pill shape
|
||||||
RoundedRectangle(cornerRadius: 1)
|
Capsule()
|
||||||
.fill(Color.white.opacity(0.2))
|
.fill(Color.white.opacity(0.2))
|
||||||
.frame(height: 3)
|
.frame(height: 3)
|
||||||
|
|
||||||
// Progress fill
|
// Progress fill - rounded to match pill shape
|
||||||
RoundedRectangle(cornerRadius: 1)
|
Capsule()
|
||||||
.fill(Color.amber)
|
.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)
|
.frame(height: 80)
|
||||||
|
|||||||
Reference in New Issue
Block a user