Repository navigation
Fix minimal mode tab bar disappearing in fullscreen #2375
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2348,7 +2348,10 @@ struct ContentView: View { | |
| } | ||
|
|
||
| private var effectiveTitlebarPadding: CGFloat { | ||
| isMinimalMode ? -titlebarPadding : titlebarPadding | ||
| if isMinimalMode { | ||
| return isFullScreen ? 0 : -titlebarPadding | ||
| } | ||
| return titlebarPadding | ||
| } | ||
|
|
||
| private var terminalContent: some View { | ||
|
|
@@ -2378,6 +2381,7 @@ struct ContentView: View { | |
| workspace: tab, | ||
| isWorkspaceVisible: presentation.isPanelVisible, | ||
| isWorkspaceInputActive: isInputActive, | ||
| isFullScreen: isFullScreen, | ||
| workspacePortalPriority: portalPriority, | ||
| onThemeRefreshRequest: { reason, eventId, source, payloadHex in | ||
| scheduleTitlebarThemeRefreshFromWorkspace( | ||
|
|
@@ -2514,7 +2518,7 @@ struct ContentView: View { | |
| } | ||
|
|
||
| private func syncTrafficLightInset() { | ||
| let inset: CGFloat = (isMinimalMode && !sidebarState.isVisible) ? 80 : 0 | ||
| let inset: CGFloat = (isMinimalMode && !sidebarState.isVisible && !isFullScreen) ? 80 : 0 | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P2: Because this inset now depends on Prompt for AI agents |
||
| for tab in tabManager.tabs { | ||
| if tab.bonsplitController.configuration.appearance.tabBarLeadingInset != inset { | ||
| tab.bonsplitController.configuration.appearance.tabBarLeadingInset = inset | ||
|
|
@@ -3051,6 +3055,7 @@ struct ContentView: View { | |
| isFullScreen = true | ||
| setTitlebarControlsHidden(true, in: window) | ||
| AppDelegate.shared?.fullscreenControlsViewModel = fullscreenControlsViewModel | ||
| syncTrafficLightInset() | ||
| }) | ||
|
|
||
| view = AnyView(view.onReceive(NotificationCenter.default.publisher(for: NSWindow.didExitFullScreenNotification)) { notification in | ||
|
|
@@ -3059,6 +3064,7 @@ struct ContentView: View { | |
| isFullScreen = false | ||
| setTitlebarControlsHidden(false, in: window) | ||
| AppDelegate.shared?.fullscreenControlsViewModel = nil | ||
| syncTrafficLightInset() | ||
| }) | ||
|
|
||
| view = AnyView(view.onReceive(NotificationCenter.default.publisher(for: NSWindow.didResizeNotification)) { notification in | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
syncTrafficLightInset()now depends onisFullScreen, butisFullScreenis also initialized asynchronously fromwindow.styleMask.contains(.fullScreen)(outside the enter/exit fullscreen notifications). SincesyncTrafficLightInset()is only called on appear and on specific change handlers, a window restored already in fullscreen can keep the old 80px tab leading inset until another trigger occurs. Please also resync when the initial fullscreen state is set (for example via anonChange(of: isFullScreen)handler or immediately after that assignment).Useful? React with 👍 / 👎.