mirror of
https://github.com/yattee/yattee.git
synced 2025-04-28 07:50:33 +05:30
honour the aspect ratio when resizing
The `defaultMinimumHeightLeft? has been adjusted to make the radio of the video view 16:9 in its initial state. Also on macOS when resizing the window, the aspect ratio of the view now correlates with the video.
This commit is contained in:
parent
987f6dcac8
commit
8900f96ce7
@ -27,10 +27,7 @@ struct VideoPlayerSizeModifier: ViewModifier {
|
||||
content
|
||||
.frame(width: geometry.size.width)
|
||||
.frame(maxHeight: maxHeight)
|
||||
|
||||
#if !os(macOS)
|
||||
.aspectRatio(ratio, contentMode: usedAspectRatioContentMode)
|
||||
#endif
|
||||
}
|
||||
|
||||
var ratio: CGFloat? { // swiftlint:disable:this no_cgfloat
|
||||
|
@ -22,7 +22,7 @@ struct VideoPlayerView: View {
|
||||
static let defaultAspectRatio = 16 / 9.0
|
||||
static var defaultMinimumHeightLeft: Double {
|
||||
#if os(macOS)
|
||||
300
|
||||
335
|
||||
#else
|
||||
200
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user