mirror of
https://github.com/yattee/yattee.git
synced 2024-12-14 14:20:32 +05:30
Fix details overlay height
This commit is contained in:
parent
607d2f9b83
commit
504e2e721a
@ -102,7 +102,7 @@ struct PlayerControls: View {
|
|||||||
.opacity(model.presentingControlsOverlay ? 1 : 0)
|
.opacity(model.presentingControlsOverlay ? 1 : 0)
|
||||||
|
|
||||||
VideoDetailsOverlay()
|
VideoDetailsOverlay()
|
||||||
.frame(maxWidth: detailsWidth, maxHeight: 450)
|
.frame(maxWidth: detailsWidth, maxHeight: detailsHeight)
|
||||||
.modifier(ControlBackgroundModifier())
|
.modifier(ControlBackgroundModifier())
|
||||||
.clipShape(RoundedRectangle(cornerRadius: 4))
|
.clipShape(RoundedRectangle(cornerRadius: 4))
|
||||||
.opacity(model.presentingDetailsOverlay ? 1 : 0)
|
.opacity(model.presentingDetailsOverlay ? 1 : 0)
|
||||||
@ -140,6 +140,11 @@ struct PlayerControls: View {
|
|||||||
return [player.playerSize.width, 600].min()!
|
return [player.playerSize.width, 600].min()!
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var detailsHeight: Double {
|
||||||
|
guard let player = player, player.playerSize.height.isFinite else { return 200 }
|
||||||
|
return [player.playerSize.height, 500].min()!
|
||||||
|
}
|
||||||
|
|
||||||
@ViewBuilder var controlsBackground: some View {
|
@ViewBuilder var controlsBackground: some View {
|
||||||
if player.musicMode,
|
if player.musicMode,
|
||||||
let item = self.player.currentItem,
|
let item = self.player.currentItem,
|
||||||
|
Loading…
Reference in New Issue
Block a user