Balance mini player content padding
This commit is contained in:
1 parent
66bea05615
commit
b7ac719ca0
2 files changed
+10
-11
No files matched your search
@@ -44,18 +44,18 @@ struct MiniPlayerView: View {
|
||||
var body: some View {
|
||||
HStack(spacing: usesCompactLayout ? 8 : 10) {
|
||||
artwork
|
||||
.frame(width: usesCompactLayout ? 32 : 40, height: usesCompactLayout ? 32 : 40)
|
||||
.clipShape(RoundedRectangle(cornerRadius: usesCompactLayout ? 8 : 11, style: .continuous))
|
||||
.frame(width: usesCompactLayout ? 32 : 36, height: 32)
|
||||
.clipShape(RoundedRectangle(cornerRadius: usesCompactLayout ? 8 : 10, style: .continuous))
|
||||
.accessibilityHidden(true)
|
||||
|
||||
VStack(alignment: .leading, spacing: 2) {
|
||||
VStack(alignment: .leading, spacing: 0) {
|
||||
Text(track.name)
|
||||
.font(.system(size: usesCompactLayout ? 13 : 16, weight: .semibold))
|
||||
.font(.system(size: usesCompactLayout ? 13 : 14, weight: .semibold))
|
||||
.lineLimit(1)
|
||||
.truncationMode(.tail)
|
||||
|
||||
Text(artistNames.isEmpty ? "Unknown Artist" : artistNames)
|
||||
.font(.system(size: usesCompactLayout ? 11 : 14))
|
||||
.font(.system(size: usesCompactLayout ? 11 : 12))
|
||||
.foregroundStyle(.secondary)
|
||||
.lineLimit(1)
|
||||
.truncationMode(.tail)
|
||||
@@ -68,7 +68,7 @@ struct MiniPlayerView: View {
|
||||
} label: {
|
||||
Image(systemName: displayedIsPlaying ? "pause.fill" : "play.fill")
|
||||
.font(.system(size: usesCompactLayout ? 18 : 21, weight: .medium))
|
||||
.frame(width: usesCompactLayout ? 34 : 42, height: usesCompactLayout ? 32 : 36)
|
||||
.frame(width: usesCompactLayout ? 34 : 42, height: 32)
|
||||
.contentShape(Rectangle())
|
||||
}
|
||||
.buttonStyle(.plain)
|
||||
@@ -77,17 +77,17 @@ struct MiniPlayerView: View {
|
||||
Button(action: onNext) {
|
||||
Image(systemName: "forward.end.fill")
|
||||
.font(.system(size: usesCompactLayout ? 18 : 21, weight: .medium))
|
||||
.frame(width: usesCompactLayout ? 34 : 42, height: usesCompactLayout ? 32 : 36)
|
||||
.frame(width: usesCompactLayout ? 34 : 42, height: 32)
|
||||
.contentShape(Rectangle())
|
||||
}
|
||||
.buttonStyle(.plain)
|
||||
.accessibilityLabel("Next track")
|
||||
}
|
||||
.frame(height: 32)
|
||||
.padding(.leading, usesCompactLayout ? 10 : 16)
|
||||
.padding(.trailing, usesCompactLayout ? 9 : 14)
|
||||
.padding(.top, 12)
|
||||
.padding(.bottom, usesCompactLayout ? 8 : 4)
|
||||
.frame(height: 52, alignment: .top)
|
||||
.padding(.vertical, 8)
|
||||
.frame(height: 52)
|
||||
.foregroundStyle(.primary)
|
||||
.onChange(of: isPlaying) { _, newValue in
|
||||
displayedIsPlaying = newValue
|
||||
|
||||
Reference in new issue
Block a user