ui: refine subtitle layout and preserve hidden controls on seeks
This commit is contained in:
@@ -528,7 +528,7 @@ final class PlayerModel: ObservableObject {
|
||||
let accepted = transition.seek(target, handle: handle)
|
||||
if accepted { seekPosition = target }
|
||||
commandError = accepted ? nil : "Could not queue the seek. Please try again."
|
||||
revealControls()
|
||||
if !accepted { revealControls() }
|
||||
return accepted
|
||||
}
|
||||
|
||||
@@ -1328,7 +1328,7 @@ private struct CaptionSelector: NSViewRepresentable {
|
||||
imageScaling = .scaleProportionallyUpOrDown
|
||||
(cell as? NSPopUpButtonCell)?.arrowPosition = .noArrow
|
||||
let symbol = NSImage(systemSymbolName: "captions.bubble", accessibilityDescription: "Subtitles")?
|
||||
.withSymbolConfiguration(.init(pointSize: 17, weight: .regular))
|
||||
.withSymbolConfiguration(.init(pointSize: 16, weight: .regular))
|
||||
captionItem.image = symbol
|
||||
contentTintColor = SunsetPalette.text
|
||||
toolTip = "Subtitles"
|
||||
@@ -1591,7 +1591,7 @@ private struct PlayerContent: View {
|
||||
PlayerActionButton(model: model, action: model.onTopAction,
|
||||
title: model.isOnTop ? "Stop Keeping Window on Top" : "Keep Window on Top")
|
||||
} label: {
|
||||
Image(systemName: "gearshape").font(.system(size: 17)).frame(width: 24, height: 24)
|
||||
Image(systemName: "gearshape").font(.system(size: model.isCompact ? 21 : 17)).frame(width: 24, height: 24)
|
||||
}
|
||||
.menuStyle(.borderlessButton)
|
||||
.menuIndicator(.hidden)
|
||||
@@ -1738,10 +1738,15 @@ private struct PlayerContent: View {
|
||||
.font(.system(size: max(16, min(28, geometry.size.width / 32)), weight: .semibold))
|
||||
.foregroundStyle(.white)
|
||||
.multilineTextAlignment(.center)
|
||||
.fixedSize(horizontal: false, vertical: true)
|
||||
.frame(maxWidth: .infinity)
|
||||
.padding(12)
|
||||
.background(PlayerGlass().clipShape(RoundedRectangle(cornerRadius: 12)).allowsHitTesting(false))
|
||||
.padding(.horizontal, 24)
|
||||
.padding(.bottom, model.controlsVisible ? 110 : 24)
|
||||
.background(PlayerGlass().opacity(0.6)
|
||||
.clipShape(RoundedRectangle(cornerRadius: 12)).allowsHitTesting(false))
|
||||
.padding(.horizontal, 8)
|
||||
.padding(.bottom, model.controlsVisible
|
||||
? (model.isCompact ? compactControlHeight + 20 : 110)
|
||||
: (model.isCompact ? 12 : 24))
|
||||
.frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .bottom)
|
||||
.allowsHitTesting(false)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user