fix(macOS): Hide titlebar separator line in native fullscreen.

This commit is contained in:
Qwerasd
2024-02-04 14:22:44 -05:00
parent e3e86c4b23
commit 7f217fc326

View File

@ -20,6 +20,8 @@ class FullScreenHandler {
leaveFullscreen(window: window) leaveFullscreen(window: window)
isInNonNativeFullscreen = false isInNonNativeFullscreen = false
} else { } else {
// Restore titlebar separator style. See below for explanation.
window.titlebarSeparatorStyle = .automatic
window.toggleFullScreen(nil) window.toggleFullScreen(nil)
} }
isInFullscreen = false isInFullscreen = false
@ -29,6 +31,10 @@ class FullScreenHandler {
enterFullscreen(window: window, hideMenu: hideMenu) enterFullscreen(window: window, hideMenu: hideMenu)
isInNonNativeFullscreen = true isInNonNativeFullscreen = true
} else { } else {
// The titlebar separator shows up erroneously in fullscreen if the tab bar
// is made to appear and then disappear by opening and then closing a tab.
// We get rid of the separator while in fullscreen to prevent this.
window.titlebarSeparatorStyle = .none
window.toggleFullScreen(nil) window.toggleFullScreen(nil)
} }
isInFullscreen = true isInFullscreen = true