fix: remove gap beside playback queue
This commit is contained in:
@@ -142,7 +142,7 @@ struct SystemPlaybackChecks {
|
||||
model.attachWindow(window)
|
||||
let videoFrame = window.frame
|
||||
model.showsQueue = true
|
||||
require(abs(window.frame.width - videoFrame.width - 261) < 0.01 &&
|
||||
require(abs(window.frame.width - videoFrame.width - 260) < 0.01 &&
|
||||
abs(window.frame.height - videoFrame.height) < 0.01,
|
||||
"opening queue grows window without shrinking video")
|
||||
model.showsQueue = false
|
||||
|
||||
@@ -57,7 +57,7 @@ Active playback prevents idle system sleep. Local video also keeps the display a
|
||||
|
||||
Use the titlebar's **Queue** icon or **View → Show Queue** to show the editable sidebar. **Add to Queue…** and dropping files onto the sidebar append without replacing the queue or interrupting the current item. Drag rows to reorder, remove them with the minus button, and double-click a row to play it. The current item is marked; context menus also offer Play, Remove and Move Up/Down.
|
||||
|
||||
In a normal window, showing the queue expands the window outward while preserving the video's size; hiding it removes that extra width. The window shifts left when necessary near the screen's right edge. Fullscreen keeps its fixed bounds.
|
||||
In a normal window, showing the queue expands the window outward while preserving the video's size; hiding it removes that extra width. The sidebar meets the video directly, without a separate divider gap. The window shifts left when necessary near the screen's right edge. Fullscreen keeps its fixed bounds.
|
||||
|
||||
While the sidebar is open, its persistent top header holds the queue count, queue toggle, pin, Cast and settings controls; these do not fade with the video controls. Closing the sidebar returns those controls to the auto-hiding video titlebar.
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ final class PlayerModel: ObservableObject {
|
||||
!isCompact, !compactWindow.isTransitioning else { return }
|
||||
window.aspectRatio = .zero
|
||||
var frame = window.frame
|
||||
frame.size.width += showsQueue ? 261 : -261
|
||||
frame.size.width += showsQueue ? 260 : -260
|
||||
if let screen = window.screen?.visibleFrame {
|
||||
frame.origin.x = max(screen.minX, min(frame.minX, screen.maxX - frame.width))
|
||||
}
|
||||
@@ -983,7 +983,7 @@ final class PlayerModel: ObservableObject {
|
||||
return
|
||||
}
|
||||
let screen = (window.screen ?? NSScreen.main)?.visibleFrame ?? window.frame
|
||||
let sidebarWidth: CGFloat = showsQueue ? 261 : 0
|
||||
let sidebarWidth: CGFloat = showsQueue ? 260 : 0
|
||||
let width = min(window.frame.width - sidebarWidth, screen.width - sidebarWidth, screen.height * aspect)
|
||||
let size = NSSize(width: width + sidebarWidth, height: width / aspect)
|
||||
// ponytail: extreme ratios retain letterboxing; compact controls if exact fitting is needed.
|
||||
@@ -2327,7 +2327,6 @@ private struct PlayerContent: View {
|
||||
HStack(spacing: 0) {
|
||||
videoContent
|
||||
if model.showsQueue && !model.isCompact && !model.compactWindow.isTransitioning {
|
||||
Divider()
|
||||
queueSidebar
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user