fix: center controller content and autoplay opened files
This commit is contained in:
@@ -95,12 +95,11 @@ final class PlayerModel: ObservableObject {
|
||||
commandError = "Could not queue the file to open. Please try again."
|
||||
return
|
||||
}
|
||||
// Open is always paused; never queue play against the previous file.
|
||||
pendingRevision = revision
|
||||
fileName = url.lastPathComponent
|
||||
fileIcon = NSWorkspace.shared.icon(forFile: url.path)
|
||||
needsVideoFit = true
|
||||
commandError = nil
|
||||
commandError = player_play(handle) ? nil : "Could not queue playback. Please try again."
|
||||
isSeeking = false
|
||||
seekPending = false
|
||||
seekPosition = 0
|
||||
@@ -528,7 +527,6 @@ private struct PlayerContent: View {
|
||||
.frame(width: 106, alignment: .trailing)
|
||||
}
|
||||
.padding(.horizontal, 16)
|
||||
.padding(.top, 14)
|
||||
|
||||
HStack(spacing: 10) {
|
||||
Text(time(model.seekPosition)).frame(minWidth: 32, alignment: .trailing)
|
||||
@@ -553,8 +551,10 @@ private struct PlayerContent: View {
|
||||
}
|
||||
.font(.system(size: 11).monospacedDigit())
|
||||
.padding(.horizontal, 16)
|
||||
.padding(.bottom, 8)
|
||||
}
|
||||
.padding(.vertical, 11)
|
||||
// Optical centering accounts for symbol insets and the native seek thumb.
|
||||
.offset(y: -1.5)
|
||||
.foregroundStyle(.white.opacity(0.6))
|
||||
.onHover(perform: model.setControlsHovered)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user