mirror of
https://github.com/yattee/yattee.git
synced 2025-08-05 02:04:07 +00:00
Add setting for disabling thumbnails rounding
This commit is contained in:
@@ -18,6 +18,7 @@ struct VideoCell: View {
|
||||
|
||||
@Default(.channelOnThumbnail) private var channelOnThumbnail
|
||||
@Default(.timeOnThumbnail) private var timeOnThumbnail
|
||||
@Default(.roundedThumbnails) private var roundedThumbnails
|
||||
@Default(.saveHistory) private var saveHistory
|
||||
@Default(.showWatchingProgress) private var showWatchingProgress
|
||||
@Default(.watchedVideoStyle) private var watchedVideoStyle
|
||||
@@ -39,7 +40,7 @@ struct VideoCell: View {
|
||||
}
|
||||
.opacity(contentOpacity)
|
||||
.buttonStyle(.plain)
|
||||
.contentShape(RoundedRectangle(cornerRadius: 12))
|
||||
.contentShape(RoundedRectangle(cornerRadius: thumbnailRoundingCornerRadius))
|
||||
.contextMenu {
|
||||
VideoContextMenuView(
|
||||
video: video,
|
||||
@@ -49,6 +50,14 @@ struct VideoCell: View {
|
||||
}
|
||||
}
|
||||
|
||||
private var thumbnailRoundingCornerRadius: Double {
|
||||
#if os(tvOS)
|
||||
return Double(12)
|
||||
#else
|
||||
return Double(roundedThumbnails ? 12 : 0)
|
||||
#endif
|
||||
}
|
||||
|
||||
private func playAction() {
|
||||
if watchingNow {
|
||||
if !player.playingInPictureInPicture {
|
||||
@@ -389,7 +398,7 @@ struct VideoCell: View {
|
||||
.font(.system(size: 30))
|
||||
}
|
||||
}
|
||||
.mask(RoundedRectangle(cornerRadius: 12))
|
||||
.mask(RoundedRectangle(cornerRadius: thumbnailRoundingCornerRadius))
|
||||
.modifier(AspectRatioModifier())
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user