From 7b2dd75f2d41aad964c1cd61ac94ab9fcc74090a Mon Sep 17 00:00:00 2001 From: Arkadiusz Fal Date: Mon, 22 Aug 2022 00:57:01 +0200 Subject: [PATCH] Fix details overlay layout --- Shared/Player/Controls/PlayerControls.swift | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Shared/Player/Controls/PlayerControls.swift b/Shared/Player/Controls/PlayerControls.swift index 710b17b3..be2ffda5 100644 --- a/Shared/Player/Controls/PlayerControls.swift +++ b/Shared/Player/Controls/PlayerControls.swift @@ -35,7 +35,7 @@ struct PlayerControls: View { } var body: some View { - ZStack(alignment: .topLeading) { + ZStack(alignment: .center) { VStack { ZStack(alignment: .center) { OpeningStream() @@ -101,9 +101,12 @@ struct PlayerControls: View { #endif if model.presentingDetailsOverlay { - VideoDetailsOverlay() - .frame(maxWidth: detailsWidth, maxHeight: detailsHeight) - .transition(.opacity) + Section { + VideoDetailsOverlay() + .frame(maxWidth: detailsWidth, maxHeight: detailsHeight) + .transition(.opacity) + } + .frame(maxHeight: .infinity, alignment: .top) } if !model.presentingControls, @@ -126,6 +129,7 @@ struct PlayerControls: View { .modifier(ControlBackgroundModifier()) .clipShape(RoundedRectangle(cornerRadius: 2)) } + .frame(maxHeight: .infinity, alignment: .top) .buttonStyle(.plain) .transition(.opacity) }