mirror of
https://github.com/yattee/yattee.git
synced 2025-08-09 20:24:06 +00:00
Watch Now section, horizontal cells
This commit is contained in:
@@ -3,8 +3,8 @@ import SwiftUI
|
||||
|
||||
struct VideoPlayerSizeModifier: ViewModifier {
|
||||
let geometry: GeometryProxy
|
||||
let aspectRatio: CGFloat?
|
||||
let minimumHeightLeft: CGFloat
|
||||
let aspectRatio: Double?
|
||||
let minimumHeightLeft: Double
|
||||
|
||||
#if os(iOS)
|
||||
@Environment(\.verticalSizeClass) private var verticalSizeClass
|
||||
@@ -12,8 +12,8 @@ struct VideoPlayerSizeModifier: ViewModifier {
|
||||
|
||||
init(
|
||||
geometry: GeometryProxy,
|
||||
aspectRatio: CGFloat? = nil,
|
||||
minimumHeightLeft: CGFloat? = nil
|
||||
aspectRatio: Double? = nil,
|
||||
minimumHeightLeft: Double? = nil
|
||||
) {
|
||||
self.geometry = geometry
|
||||
self.aspectRatio = aspectRatio ?? VideoPlayerView.defaultAspectRatio
|
||||
@@ -27,7 +27,7 @@ struct VideoPlayerSizeModifier: ViewModifier {
|
||||
.edgesIgnoringSafeArea(edgesIgnoringSafeArea)
|
||||
}
|
||||
|
||||
var usedAspectRatio: CGFloat {
|
||||
var usedAspectRatio: Double {
|
||||
guard aspectRatio != nil else {
|
||||
return VideoPlayerView.defaultAspectRatio
|
||||
}
|
||||
@@ -50,7 +50,7 @@ struct VideoPlayerSizeModifier: ViewModifier {
|
||||
#endif
|
||||
}
|
||||
|
||||
var maxHeight: CGFloat {
|
||||
var maxHeight: Double {
|
||||
#if os(iOS)
|
||||
verticalSizeClass == .regular ? geometry.size.height - minimumHeightLeft : .infinity
|
||||
#else
|
||||
|
Reference in New Issue
Block a user