From afb0c30e095890b50517b6325ed56e2ea97c87a0 Mon Sep 17 00:00:00 2001 From: hl-valdemar Date: Sun, 18 Oct 2026 01:41:47 +0200 Subject: [PATCH] fix: remove gap beside playback queue --- Checks/system-playback.swift | 2 +- README.md | 2 +- Sources/App/TerebiApp.swift | 5 ++--- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Checks/system-playback.swift b/Checks/system-playback.swift index b83a929..79adb07 100644 --- a/Checks/system-playback.swift +++ b/Checks/system-playback.swift @@ -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 diff --git a/README.md b/README.md index e4ab64f..d708c71 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/Sources/App/TerebiApp.swift b/Sources/App/TerebiApp.swift index faa088f..5c8c20b 100644 --- a/Sources/App/TerebiApp.swift +++ b/Sources/App/TerebiApp.swift @@ -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 } }