1
0
mirror of https://github.com/yattee/yattee.git synced 2024-12-15 06:40:32 +05:30

Minor improvements to controls

This commit is contained in:
Arkadiusz Fal 2022-05-20 23:21:54 +02:00
parent a4fb39a0d7
commit 0c7f963378

View File

@ -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()