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:
parent
a4fb39a0d7
commit
0c7f963378
@ -29,6 +29,7 @@ struct PlayerControls: View {
|
|||||||
ZStack(alignment: .bottom) {
|
ZStack(alignment: .bottom) {
|
||||||
VStack(spacing: 0) {
|
VStack(spacing: 0) {
|
||||||
Group {
|
Group {
|
||||||
|
HStack {
|
||||||
statusBar
|
statusBar
|
||||||
.padding(3)
|
.padding(3)
|
||||||
#if os(macOS)
|
#if os(macOS)
|
||||||
@ -38,6 +39,9 @@ struct PlayerControls: View {
|
|||||||
#endif
|
#endif
|
||||||
.mask(RoundedRectangle(cornerRadius: 3))
|
.mask(RoundedRectangle(cornerRadius: 3))
|
||||||
|
|
||||||
|
Spacer()
|
||||||
|
}
|
||||||
|
|
||||||
buttonsBar
|
buttonsBar
|
||||||
.padding(.top, 4)
|
.padding(.top, 4)
|
||||||
.padding(.horizontal, 4)
|
.padding(.horizontal, 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