mirror of
https://github.com/yattee/yattee.git
synced 2026-05-13 02:45:03 +00:00
Hide list row dividers and card clipping on tvOS
Dividers inside rows conflict with the tvOS focus highlight effect. Remove dividers and the inset card background/clipShape on tvOS so the focus effect renders cleanly without visual artifacts.
This commit is contained in:
@@ -54,8 +54,10 @@ struct VideoListContent<Content: View>: View {
|
|||||||
|
|
||||||
if listStyle == .inset {
|
if listStyle == .inset {
|
||||||
list
|
list
|
||||||
|
#if !os(tvOS)
|
||||||
.background(ListBackgroundStyle.card.color)
|
.background(ListBackgroundStyle.card.color)
|
||||||
.clipShape(RoundedRectangle(cornerRadius: cardCornerRadius))
|
.clipShape(RoundedRectangle(cornerRadius: cardCornerRadius))
|
||||||
|
#endif
|
||||||
.padding(.horizontal, cardHorizontalPadding)
|
.padding(.horizontal, cardHorizontalPadding)
|
||||||
.padding(.bottom, bottomPadding)
|
.padding(.bottom, bottomPadding)
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -98,7 +98,7 @@ struct VideoListRow<Content: View>: View {
|
|||||||
.fill(Color(nsColor: .separatorColor))
|
.fill(Color(nsColor: .separatorColor))
|
||||||
.frame(height: 1)
|
.frame(height: 1)
|
||||||
.padding(.leading, dividerLeadingPadding)
|
.padding(.leading, dividerLeadingPadding)
|
||||||
#else
|
#elseif !os(tvOS)
|
||||||
Divider()
|
Divider()
|
||||||
.padding(.leading, dividerLeadingPadding)
|
.padding(.leading, dividerLeadingPadding)
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user