mirror of
https://github.com/yattee/yattee.git
synced 2025-04-28 16:00:33 +05:30
Fix #468
This commit is contained in:
parent
b16eae3d88
commit
0dee8310ce
@ -15,6 +15,7 @@ struct VideoBanner: View {
|
|||||||
@Default(.watchedVideoStyle) private var watchedVideoStyle
|
@Default(.watchedVideoStyle) private var watchedVideoStyle
|
||||||
@Default(.watchedVideoBadgeColor) private var watchedVideoBadgeColor
|
@Default(.watchedVideoBadgeColor) private var watchedVideoBadgeColor
|
||||||
@Default(.timeOnThumbnail) private var timeOnThumbnail
|
@Default(.timeOnThumbnail) private var timeOnThumbnail
|
||||||
|
@Default(.roundedThumbnails) private var roundedThumbnails
|
||||||
|
|
||||||
@Environment(\.inChannelView) private var inChannelView
|
@Environment(\.inChannelView) private var inChannelView
|
||||||
@Environment(\.inNavigationView) private var inNavigationView
|
@Environment(\.inNavigationView) private var inNavigationView
|
||||||
@ -133,6 +134,14 @@ struct VideoBanner: View {
|
|||||||
.contentShape(Rectangle())
|
.contentShape(Rectangle())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private var thumbnailRoundingCornerRadius: Double {
|
||||||
|
#if os(tvOS)
|
||||||
|
return Double(12)
|
||||||
|
#else
|
||||||
|
return Double(roundedThumbnails ? 6 : 0)
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
private var extraAttributes: some View {
|
private var extraAttributes: some View {
|
||||||
HStack(spacing: 16) {
|
HStack(spacing: 16) {
|
||||||
if let video {
|
if let video {
|
||||||
@ -187,11 +196,7 @@ struct VideoBanner: View {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.frame(width: thumbnailWidth, height: thumbnailHeight)
|
.frame(width: thumbnailWidth, height: thumbnailHeight)
|
||||||
#if os(tvOS)
|
.mask(RoundedRectangle(cornerRadius: thumbnailRoundingCornerRadius))
|
||||||
.mask(RoundedRectangle(cornerRadius: 12))
|
|
||||||
#else
|
|
||||||
.mask(RoundedRectangle(cornerRadius: 6))
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private var contentOpacity: Double {
|
private var contentOpacity: Double {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user