Apply glass tint to full mini player
This commit is contained in:
1 parent
80812e8fc1
commit
66bea05615
2 files changed
+6
-5
No files matched your search
@@ -63,8 +63,10 @@ private struct PlayerBottomAccessory: View {
|
|||||||
onTogglePlayback: onTogglePlayback,
|
onTogglePlayback: onTogglePlayback,
|
||||||
onNext: onNext
|
onNext: onNext
|
||||||
)
|
)
|
||||||
.padding(.horizontal, placement == .inline ? 4 : 12)
|
.padding(.horizontal, placement == .inline ? 4 : 0)
|
||||||
.frame(maxWidth: placement == .inline ? 320 : .infinity)
|
.frame(maxWidth: placement == .inline ? 320 : .infinity)
|
||||||
|
.glassEffect(.regular.tint(.black.opacity(0.36)), in: Capsule())
|
||||||
|
.shadow(color: .black.opacity(placement == .inline ? 0 : 0.08), radius: 8, y: 3)
|
||||||
.padding(.bottom, placement == .inline ? 0 : 8)
|
.padding(.bottom, placement == .inline ? 0 : 8)
|
||||||
.transition(.move(edge: .bottom).combined(with: .opacity))
|
.transition(.move(edge: .bottom).combined(with: .opacity))
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ struct MiniPlayerView: View {
|
|||||||
} label: {
|
} label: {
|
||||||
Image(systemName: displayedIsPlaying ? "pause.fill" : "play.fill")
|
Image(systemName: displayedIsPlaying ? "pause.fill" : "play.fill")
|
||||||
.font(.system(size: usesCompactLayout ? 18 : 21, weight: .medium))
|
.font(.system(size: usesCompactLayout ? 18 : 21, weight: .medium))
|
||||||
.frame(width: usesCompactLayout ? 34 : 42, height: 36)
|
.frame(width: usesCompactLayout ? 34 : 42, height: usesCompactLayout ? 32 : 36)
|
||||||
.contentShape(Rectangle())
|
.contentShape(Rectangle())
|
||||||
}
|
}
|
||||||
.buttonStyle(.plain)
|
.buttonStyle(.plain)
|
||||||
@@ -77,7 +77,7 @@ struct MiniPlayerView: View {
|
|||||||
Button(action: onNext) {
|
Button(action: onNext) {
|
||||||
Image(systemName: "forward.end.fill")
|
Image(systemName: "forward.end.fill")
|
||||||
.font(.system(size: usesCompactLayout ? 18 : 21, weight: .medium))
|
.font(.system(size: usesCompactLayout ? 18 : 21, weight: .medium))
|
||||||
.frame(width: usesCompactLayout ? 34 : 42, height: 36)
|
.frame(width: usesCompactLayout ? 34 : 42, height: usesCompactLayout ? 32 : 36)
|
||||||
.contentShape(Rectangle())
|
.contentShape(Rectangle())
|
||||||
}
|
}
|
||||||
.buttonStyle(.plain)
|
.buttonStyle(.plain)
|
||||||
@@ -86,10 +86,9 @@ struct MiniPlayerView: View {
|
|||||||
.padding(.leading, usesCompactLayout ? 10 : 16)
|
.padding(.leading, usesCompactLayout ? 10 : 16)
|
||||||
.padding(.trailing, usesCompactLayout ? 9 : 14)
|
.padding(.trailing, usesCompactLayout ? 9 : 14)
|
||||||
.padding(.top, 12)
|
.padding(.top, 12)
|
||||||
|
.padding(.bottom, usesCompactLayout ? 8 : 4)
|
||||||
.frame(height: 52, alignment: .top)
|
.frame(height: 52, alignment: .top)
|
||||||
.foregroundStyle(.primary)
|
.foregroundStyle(.primary)
|
||||||
.glassEffect(.regular.tint(.black.opacity(0.24)), in: Capsule())
|
|
||||||
.shadow(color: .black.opacity(usesCompactLayout ? 0 : 0.08), radius: 8, y: 3)
|
|
||||||
.onChange(of: isPlaying) { _, newValue in
|
.onChange(of: isPlaying) { _, newValue in
|
||||||
displayedIsPlaying = newValue
|
displayedIsPlaying = newValue
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user