Polish Search view layout on tvOS

- Disable scroll clipping so focused source/channel/playlist cards show full halo
- Remove rounded clip on source picker row that cut the Menu focus effect
- Replace tappable recents header Button with a plain label on tvOS
- Add vertical spacing between recent search items
- Widen recent channel and playlist cards and reserve space for two-line titles
- Increase horizontal spacing between cards so focus halos don't collide
This commit is contained in:
Arkadiusz Fal
2026-04-17 19:50:04 +02:00
parent 5cbcceba9a
commit 663e96c859
3 changed files with 72 additions and 8 deletions

View File

@@ -17,6 +17,14 @@ struct PlaylistCardView: View {
private var titleFont: Font { isCompact ? .caption : .subheadline }
private var authorFont: Font { isCompact ? .caption2 : .caption }
private var metadataHeight: CGFloat {
#if os(tvOS)
isCompact ? 90 : 110
#else
isCompact ? 50 : 58
#endif
}
var body: some View {
VStack(alignment: .leading, spacing: isCompact ? 4 : 8) {
@@ -61,15 +69,17 @@ struct PlaylistCardView: View {
.fontWeight(.medium)
.lineLimit(2)
.multilineTextAlignment(.leading)
.fixedSize(horizontal: false, vertical: true)
.frame(maxWidth: .infinity, alignment: .leading)
Text(playlist.authorName)
.font(authorFont)
.foregroundStyle(.secondary)
.lineLimit(1)
Spacer(minLength: 0)
}
.frame(height: isCompact ? 50 : 58)
.frame(height: metadataHeight)
}
.contentShape(Rectangle())
}