fix: remove gap beside playback queue

This commit is contained in:
2026-10-18 01:41:47 +02:00
parent 2690a22d39
commit afb0c30e09
3 changed files with 4 additions and 5 deletions
+1 -1
View File
@@ -142,7 +142,7 @@ struct SystemPlaybackChecks {
model.attachWindow(window) model.attachWindow(window)
let videoFrame = window.frame let videoFrame = window.frame
model.showsQueue = true 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, abs(window.frame.height - videoFrame.height) < 0.01,
"opening queue grows window without shrinking video") "opening queue grows window without shrinking video")
model.showsQueue = false model.showsQueue = false
+1 -1
View File
@@ -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. 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. 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.
+2 -3
View File
@@ -38,7 +38,7 @@ final class PlayerModel: ObservableObject {
!isCompact, !compactWindow.isTransitioning else { return } !isCompact, !compactWindow.isTransitioning else { return }
window.aspectRatio = .zero window.aspectRatio = .zero
var frame = window.frame var frame = window.frame
frame.size.width += showsQueue ? 261 : -261 frame.size.width += showsQueue ? 260 : -260
if let screen = window.screen?.visibleFrame { if let screen = window.screen?.visibleFrame {
frame.origin.x = max(screen.minX, min(frame.minX, screen.maxX - frame.width)) frame.origin.x = max(screen.minX, min(frame.minX, screen.maxX - frame.width))
} }
@@ -983,7 +983,7 @@ final class PlayerModel: ObservableObject {
return return
} }
let screen = (window.screen ?? NSScreen.main)?.visibleFrame ?? window.frame 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 width = min(window.frame.width - sidebarWidth, screen.width - sidebarWidth, screen.height * aspect)
let size = NSSize(width: width + sidebarWidth, height: width / aspect) let size = NSSize(width: width + sidebarWidth, height: width / aspect)
// ponytail: extreme ratios retain letterboxing; compact controls if exact fitting is needed. // ponytail: extreme ratios retain letterboxing; compact controls if exact fitting is needed.
@@ -2327,7 +2327,6 @@ private struct PlayerContent: View {
HStack(spacing: 0) { HStack(spacing: 0) {
videoContent videoContent
if model.showsQueue && !model.isCompact && !model.compactWindow.isTransitioning { if model.showsQueue && !model.isCompact && !model.compactWindow.isTransitioning {
Divider()
queueSidebar queueSidebar
} }
} }