ui: align playback controls and casting styling
This commit is contained in:
@@ -31,7 +31,7 @@ struct CastDeviceMenu: View {
|
||||
Button("Find Cast Devices…") { discovery.start() }
|
||||
} label: {
|
||||
if icon {
|
||||
Image(systemName: "tv.badge.wifi")
|
||||
Image(systemName: "airplayvideo")
|
||||
.font(.system(size: 14))
|
||||
.frame(width: 24, height: 24)
|
||||
} else {
|
||||
|
||||
@@ -1800,7 +1800,6 @@ private struct PlayerContent: View {
|
||||
|
||||
private var titleControls: some View {
|
||||
HStack(spacing: 4) {
|
||||
CastDeviceMenu(model: model)
|
||||
iconButton(model.isOnTop ? "pin.fill" : "pin",
|
||||
model.isOnTop ? "Stop Keeping Window on Top" : "Keep Window on Top", action: model.toggleOnTop)
|
||||
.imageScale(.small)
|
||||
@@ -1920,9 +1919,10 @@ private struct PlayerContent: View {
|
||||
}
|
||||
Spacer(minLength: 8)
|
||||
HStack(spacing: 12) {
|
||||
CastDeviceMenu(model: model)
|
||||
if !model.subtitleTracks.isEmpty { captionsMenu }
|
||||
iconButton("pip.enter", "Enter Compact Mode", action: model.toggleCompact)
|
||||
.disabled(!model.canToggleCompact)
|
||||
captionsMenu
|
||||
}
|
||||
.frame(width: 106, alignment: .trailing)
|
||||
}
|
||||
@@ -1977,7 +1977,7 @@ private struct PlayerContent: View {
|
||||
var body: some View {
|
||||
GeometryReader { geometry in
|
||||
ZStack(alignment: .top) {
|
||||
if model.fileName == nil {
|
||||
if model.fileName == nil || model.castDevice != nil {
|
||||
PlayerGlass(blendingMode: .behindWindow, cornerRadius: 0,
|
||||
ambientGlows: !model.isBusy && model.errorText == nil)
|
||||
.allowsHitTesting(false)
|
||||
@@ -2131,7 +2131,7 @@ private struct PlayerContent: View {
|
||||
.padding(.top, 32)
|
||||
} else if let device = model.castDevice {
|
||||
VStack(spacing: 16) {
|
||||
Image(systemName: "tv.badge.wifi").font(.system(size: 48))
|
||||
Image(systemName: "airplayvideo").font(.system(size: 48))
|
||||
Text("Casting to \(device.name)").font(.headline)
|
||||
Button("Play on This Mac") { model.stopCasting() }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user