From dd7a02e02ce16280b2db48d2e53549e27193188f Mon Sep 17 00:00:00 2001 From: Brent Simmons Date: Sun, 20 Sep 2026 10:49:12 -0700 Subject: [PATCH] Hide toolbar during layout switch to avoid title view constraint conflicts. --- Mac/MainWindow/MainWindowController.swift | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Mac/MainWindow/MainWindowController.swift b/Mac/MainWindow/MainWindowController.swift index dfb5b7587..8e9938809 100644 --- a/Mac/MainWindow/MainWindowController.swift +++ b/Mac/MainWindow/MainWindowController.swift @@ -1064,9 +1064,12 @@ private extension MainWindowController { let firstResponderView = window.firstResponder as? NSView // The toolbar lives for the window’s life so the user’s customization is one thing. Only its tracking separators - // depend on the split views: they come out before the swap (AppKit reports conflicting title-view constraints otherwise) - // and go back in the same positions after, which also lets the timeline separator change kind for the new layout. + // depend on the split views: they come out before the swap and go back in the same positions after, + // which also lets the timeline separator change kind for the new layout. The toolbar is hidden meanwhile — + // AppKit lays out its title area during the swap and reports conflicting constraints without the separators. let trackingSeparators = removeTrackingSeparatorsFromToolbar() + let isToolbarVisible = window.toolbar?.isVisible ?? true + window.toolbar?.isVisible = false detachSplitViewControllers() @@ -1088,6 +1091,7 @@ private extension MainWindowController { for (identifier, index) in trackingSeparators { toolbar.insertItem(withItemIdentifier: identifier, at: index) } + toolbar.isVisible = isToolbarVisible } else { window.toolbar = makeToolbar() }