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
@@ -67,7 +67,6 @@ private struct PlayerBottomAccessory: View {
|
|||||||
.frame(maxWidth: placement == .inline ? 320 : .infinity)
|
.frame(maxWidth: placement == .inline ? 320 : .infinity)
|
||||||
.glassEffect(.regular.tint(.black.opacity(0.36)), in: Capsule())
|
.glassEffect(.regular.tint(.black.opacity(0.36)), in: Capsule())
|
||||||
.shadow(color: .black.opacity(placement == .inline ? 0 : 0.08), radius: 8, y: 3)
|
.shadow(color: .black.opacity(placement == .inline ? 0 : 0.08), radius: 8, y: 3)
|
||||||
.padding(.bottom, placement == .inline ? 0 : 8)
|
|
||||||
.transition(.move(edge: .bottom).combined(with: .opacity))
|
.transition(.move(edge: .bottom).combined(with: .opacity))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,18 +44,18 @@ struct MiniPlayerView: View {
|
|||||||
var body: some View {
|
var body: some View {
|
||||||
HStack(spacing: usesCompactLayout ? 8 : 10) {
|
HStack(spacing: usesCompactLayout ? 8 : 10) {
|
||||||
artwork
|
artwork
|
||||||
.frame(width: usesCompactLayout ? 32 : 40, height: usesCompactLayout ? 32 : 40)
|
.frame(width: usesCompactLayout ? 32 : 36, height: 32)
|
||||||
.clipShape(RoundedRectangle(cornerRadius: usesCompactLayout ? 8 : 11, style: .continuous))
|
.clipShape(RoundedRectangle(cornerRadius: usesCompactLayout ? 8 : 10, style: .continuous))
|
||||||
.accessibilityHidden(true)
|
.accessibilityHidden(true)
|
||||||
|
|
||||||
VStack(alignment: .leading, spacing: 2) {
|
VStack(alignment: .leading, spacing: 0) {
|
||||||
Text(track.name)
|
Text(track.name)
|
||||||
.font(.system(size: usesCompactLayout ? 13 : 16, weight: .semibold))
|
.font(.system(size: usesCompactLayout ? 13 : 14, weight: .semibold))
|
||||||
.lineLimit(1)
|
.lineLimit(1)
|
||||||
.truncationMode(.tail)
|
.truncationMode(.tail)
|
||||||
|
|
||||||
Text(artistNames.isEmpty ? "Unknown Artist" : artistNames)
|
Text(artistNames.isEmpty ? "Unknown Artist" : artistNames)
|
||||||
.font(.system(size: usesCompactLayout ? 11 : 14))
|
.font(.system(size: usesCompactLayout ? 11 : 12))
|
||||||
.foregroundStyle(.secondary)
|
.foregroundStyle(.secondary)
|
||||||
.lineLimit(1)
|
.lineLimit(1)
|
||||||
.truncationMode(.tail)
|
.truncationMode(.tail)
|
||||||
@@ -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: usesCompactLayout ? 32 : 36)
|
.frame(width: usesCompactLayout ? 34 : 42, height: 32)
|
||||||
.contentShape(Rectangle())
|
.contentShape(Rectangle())
|
||||||
}
|
}
|
||||||
.buttonStyle(.plain)
|
.buttonStyle(.plain)
|
||||||
@@ -77,17 +77,17 @@ 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: usesCompactLayout ? 32 : 36)
|
.frame(width: usesCompactLayout ? 34 : 42, height: 32)
|
||||||
.contentShape(Rectangle())
|
.contentShape(Rectangle())
|
||||||
}
|
}
|
||||||
.buttonStyle(.plain)
|
.buttonStyle(.plain)
|
||||||
.accessibilityLabel("Next track")
|
.accessibilityLabel("Next track")
|
||||||
}
|
}
|
||||||
|
.frame(height: 32)
|
||||||
.padding(.leading, usesCompactLayout ? 10 : 16)
|
.padding(.leading, usesCompactLayout ? 10 : 16)
|
||||||
.padding(.trailing, usesCompactLayout ? 9 : 14)
|
.padding(.trailing, usesCompactLayout ? 9 : 14)
|
||||||
.padding(.top, 12)
|
.padding(.vertical, 8)
|
||||||
.padding(.bottom, usesCompactLayout ? 8 : 4)
|
.frame(height: 52)
|
||||||
.frame(height: 52, alignment: .top)
|
|
||||||
.foregroundStyle(.primary)
|
.foregroundStyle(.primary)
|
||||||
.onChange(of: isPlaying) { _, newValue in
|
.onChange(of: isPlaying) { _, newValue in
|
||||||
displayedIsPlaying = newValue
|
displayedIsPlaying = newValue
|
||||||
|
|||||||
Reference in new issue
Block a user