mirror of
https://github.com/yattee/yattee.git
synced 2024-12-23 05:53:41 +00:00
Fix controls overlay
This commit is contained in:
parent
bc63b5c9fd
commit
42f0ff80f8
@ -19,7 +19,9 @@ struct ControlsOverlay: View {
|
|||||||
rateButton
|
rateButton
|
||||||
increaseRateButton
|
increaseRateButton
|
||||||
}
|
}
|
||||||
|
#if os(iOS)
|
||||||
.foregroundColor(.white)
|
.foregroundColor(.white)
|
||||||
|
#endif
|
||||||
|
|
||||||
if player.activeBackend == .mpv,
|
if player.activeBackend == .mpv,
|
||||||
showMPVPlaybackStats
|
showMPVPlaybackStats
|
||||||
@ -58,13 +60,13 @@ struct ControlsOverlay: View {
|
|||||||
} label: {
|
} label: {
|
||||||
Label("Increase rate", systemImage: "plus")
|
Label("Increase rate", systemImage: "plus")
|
||||||
.labelStyle(.iconOnly)
|
.labelStyle(.iconOnly)
|
||||||
.padding(.horizontal, 8)
|
.padding(8)
|
||||||
|
.frame(height: 30)
|
||||||
.contentShape(Rectangle())
|
.contentShape(Rectangle())
|
||||||
}
|
}
|
||||||
#if os(macOS)
|
#if os(macOS)
|
||||||
.buttonStyle(.bordered)
|
.buttonStyle(.bordered)
|
||||||
#else
|
#else
|
||||||
.frame(height: 30)
|
|
||||||
.modifier(ControlBackgroundModifier())
|
.modifier(ControlBackgroundModifier())
|
||||||
.clipShape(RoundedRectangle(cornerRadius: 4))
|
.clipShape(RoundedRectangle(cornerRadius: 4))
|
||||||
#endif
|
#endif
|
||||||
@ -81,13 +83,13 @@ struct ControlsOverlay: View {
|
|||||||
} label: {
|
} label: {
|
||||||
Label("Decrease rate", systemImage: "minus")
|
Label("Decrease rate", systemImage: "minus")
|
||||||
.labelStyle(.iconOnly)
|
.labelStyle(.iconOnly)
|
||||||
.padding(.horizontal, 8)
|
.padding(8)
|
||||||
|
.frame(height: 30)
|
||||||
.contentShape(Rectangle())
|
.contentShape(Rectangle())
|
||||||
}
|
}
|
||||||
#if os(macOS)
|
#if os(macOS)
|
||||||
.buttonStyle(.bordered)
|
.buttonStyle(.bordered)
|
||||||
#else
|
#else
|
||||||
.frame(height: 30)
|
|
||||||
.modifier(ControlBackgroundModifier())
|
.modifier(ControlBackgroundModifier())
|
||||||
.clipShape(RoundedRectangle(cornerRadius: 4))
|
.clipShape(RoundedRectangle(cornerRadius: 4))
|
||||||
#endif
|
#endif
|
||||||
@ -112,6 +114,8 @@ struct ControlsOverlay: View {
|
|||||||
.frame(width: 140, height: 30)
|
.frame(width: 140, height: 30)
|
||||||
.foregroundColor(.primary)
|
.foregroundColor(.primary)
|
||||||
}
|
}
|
||||||
|
.transaction { t in t.animation = .none }
|
||||||
|
|
||||||
.buttonStyle(.plain)
|
.buttonStyle(.plain)
|
||||||
.foregroundColor(.primary)
|
.foregroundColor(.primary)
|
||||||
.frame(width: 140, height: 30)
|
.frame(width: 140, height: 30)
|
||||||
@ -133,12 +137,13 @@ struct ControlsOverlay: View {
|
|||||||
Menu {
|
Menu {
|
||||||
ratePicker
|
ratePicker
|
||||||
.frame(width: 100, height: 30)
|
.frame(width: 100, height: 30)
|
||||||
|
|
||||||
.mask(RoundedRectangle(cornerRadius: 3))
|
.mask(RoundedRectangle(cornerRadius: 3))
|
||||||
} label: {
|
} label: {
|
||||||
Text(player.rateLabel(player.currentRate))
|
Text(player.rateLabel(player.currentRate))
|
||||||
.foregroundColor(.primary)
|
.foregroundColor(.primary)
|
||||||
|
.frame(width: 80)
|
||||||
}
|
}
|
||||||
|
.transaction { t in t.animation = .none }
|
||||||
.buttonStyle(.plain)
|
.buttonStyle(.plain)
|
||||||
.foregroundColor(.primary)
|
.foregroundColor(.primary)
|
||||||
.frame(width: 100, height: 30)
|
.frame(width: 100, height: 30)
|
||||||
|
@ -40,7 +40,6 @@ struct PlayerControls: View {
|
|||||||
buttonsBar
|
buttonsBar
|
||||||
|
|
||||||
if let video = player.currentVideo, player.playingFullScreen {
|
if let video = player.currentVideo, player.playingFullScreen {
|
||||||
// if let video = Video.fixture {
|
|
||||||
VStack(alignment: .leading, spacing: 8) {
|
VStack(alignment: .leading, spacing: 8) {
|
||||||
Text(video.title)
|
Text(video.title)
|
||||||
.font(.title2.bold())
|
.font(.title2.bold())
|
||||||
|
Loading…
Reference in New Issue
Block a user