mirror of
https://github.com/yattee/yattee.git
synced 2024-12-15 14:50:32 +05:30
Minor improvements to controls
This commit is contained in:
parent
a4fb39a0d7
commit
0c7f963378
@ -29,14 +29,18 @@ struct PlayerControls: View {
|
|||||||
ZStack(alignment: .bottom) {
|
ZStack(alignment: .bottom) {
|
||||||
VStack(spacing: 0) {
|
VStack(spacing: 0) {
|
||||||
Group {
|
Group {
|
||||||
statusBar
|
HStack {
|
||||||
.padding(3)
|
statusBar
|
||||||
#if os(macOS)
|
.padding(3)
|
||||||
.background(VisualEffectBlur(material: .hudWindow))
|
#if os(macOS)
|
||||||
#elseif os(iOS)
|
.background(VisualEffectBlur(material: .hudWindow))
|
||||||
.background(VisualEffectBlur(blurStyle: .systemThinMaterial))
|
#elseif os(iOS)
|
||||||
#endif
|
.background(VisualEffectBlur(blurStyle: .systemThinMaterial))
|
||||||
.mask(RoundedRectangle(cornerRadius: 3))
|
#endif
|
||||||
|
.mask(RoundedRectangle(cornerRadius: 3))
|
||||||
|
|
||||||
|
Spacer()
|
||||||
|
}
|
||||||
|
|
||||||
buttonsBar
|
buttonsBar
|
||||||
.padding(.top, 4)
|
.padding(.top, 4)
|
||||||
@ -75,18 +79,11 @@ struct PlayerControls: View {
|
|||||||
model.resetTimer()
|
model.resetTimer()
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
.background(controlsBackground)
|
.background(PlayerGestures())
|
||||||
#endif
|
#endif
|
||||||
.environment(\.colorScheme, .dark)
|
.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 {
|
var timeline: some View {
|
||||||
TimelineView(duration: durationBinding, current: currentTimeBinding, cornerRadius: 0)
|
TimelineView(duration: durationBinding, current: currentTimeBinding, cornerRadius: 0)
|
||||||
}
|
}
|
||||||
@ -112,7 +109,7 @@ struct PlayerControls: View {
|
|||||||
#endif
|
#endif
|
||||||
Text(playbackStatus)
|
Text(playbackStatus)
|
||||||
|
|
||||||
Spacer()
|
Text("•")
|
||||||
|
|
||||||
#if !os(tvOS)
|
#if !os(tvOS)
|
||||||
ToggleBackendButton()
|
ToggleBackendButton()
|
||||||
|
Loading…
Reference in New Issue
Block a user