mirror of
https://github.com/yattee/yattee.git
synced 2026-06-08 07:44:21 +00:00
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:
@@ -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())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user