Commit 5d5b1a8c authored by Kourser's avatar Kourser
Browse files

fix(macos): restore the hardware-validated Touch Bar layout

Back to exactly the strip configuration that was confirmed working on
the device — permanent 320 pt cap, no stretch constraint, no toggled
constraints — after the stretch/width games left the bar blank again at
launch. The only remaining addition over that baseline is the episodes
popover item (standard collapsed list button), so the next test isolates
a single variable.

Co-Authored-By: Claude (RCA)
parent 1da522ba
Loading
Loading
Loading
Loading
+3 −9
Original line number Diff line number Diff line
@@ -28,7 +28,6 @@ final class TouchBarController: NSObject {
    private var titleLabel: NSTextField?
    private var positionItem: NSSliderTouchBarItem?
    private var podcastScrubber: NSScrubber?
    private var podcastScrubberWidthCap: NSLayoutConstraint?
    private var episodesPopover: NSPopoverTouchBarItem?
    private var episodeScrubber: NSScrubber?

@@ -135,9 +134,6 @@ final class TouchBarController: NSObject {
                    : 0
            }
        }
        // Idle, the strip soaks up the space the slider leaves unused.
        podcastScrubberWidthCap?.isActive = hasEpisode

        // Follow the app's detail pane (and our own taps, routed through the
        // same shared state): podcast page visible -> its episode level.
        let visible = commands.visiblePodcastID
@@ -215,6 +211,8 @@ extension TouchBarController: NSTouchBarDelegate {
                                        image: Self.symbol("chevron.backward"),
                                        target: self, action: #selector(backToLibrary))
        case .skingomzPodcasts:
            // Exactly the layout validated on hardware: permanent 320 pt cap,
            // no stretching constraint (the width games blanked the bar).
            let item = NSCustomTouchBarItem(identifier: identifier)
            let scrubber = makeScrubber()
            scrubber.register(NSScrubberImageItemView.self, forItemIdentifier: Self.podcastCell)
@@ -222,12 +220,8 @@ extension TouchBarController: NSTouchBarDelegate {
            layout.itemSize = NSSize(width: 36, height: 30)
            layout.itemSpacing = 4
            scrubber.scrubberLayout = layout
            Self.stretch(scrubber)
            let cap = scrubber.widthAnchor.constraint(lessThanOrEqualToConstant: 320)
            cap.isActive = playback.currentEpisode != nil
            podcastScrubberWidthCap = cap
            scrubber.widthAnchor.constraint(lessThanOrEqualToConstant: 320).isActive = true
            item.view = scrubber
            item.visibilityPriority = .low // collapses first when space is tight
            podcastScrubber = scrubber
            return item
        case .skingomzEpisodes: