From 0c7f9633780c961f192248115fe6b5f13c232412 Mon Sep 17 00:00:00 2001 From: Arkadiusz Fal Date: Fri, 20 May 2022 23:21:54 +0200 Subject: [PATCH] Minor improvements to controls --- Shared/Player/Controls/PlayerControls.swift | 31 ++++++++++----------- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/Shared/Player/Controls/PlayerControls.swift b/Shared/Player/Controls/PlayerControls.swift index 04f74109..be854d16 100644 --- a/Shared/Player/Controls/PlayerControls.swift +++ b/Shared/Player/Controls/PlayerControls.swift @@ -29,14 +29,18 @@ struct PlayerControls: View { ZStack(alignment: .bottom) { VStack(spacing: 0) { Group { - statusBar - .padding(3) - #if os(macOS) - .background(VisualEffectBlur(material: .hudWindow)) - #elseif os(iOS) - .background(VisualEffectBlur(blurStyle: .systemThinMaterial)) - #endif - .mask(RoundedRectangle(cornerRadius: 3)) + HStack { + statusBar + .padding(3) + #if os(macOS) + .background(VisualEffectBlur(material: .hudWindow)) + #elseif os(iOS) + .background(VisualEffectBlur(blurStyle: .systemThinMaterial)) + #endif + .mask(RoundedRectangle(cornerRadius: 3)) + + Spacer() + } buttonsBar .padding(.top, 4) @@ -75,18 +79,11 @@ struct PlayerControls: View { model.resetTimer() } #else - .background(controlsBackground) + .background(PlayerGestures()) #endif .environment(\.colorScheme, .dark) } - #if !os(tvOS) - var controlsBackground: some View { - PlayerGestures() - .background(Color.black.opacity(model.presentingControls ? 0.5 : 0)) - } - #endif - var timeline: some View { TimelineView(duration: durationBinding, current: currentTimeBinding, cornerRadius: 0) } @@ -112,7 +109,7 @@ struct PlayerControls: View { #endif Text(playbackStatus) - Spacer() + Text("•") #if !os(tvOS) ToggleBackendButton()