mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-08-02 14:57:31 +03:00
macos: small stylistic edits
This commit is contained in:
@ -140,7 +140,7 @@ class TerminalController: NSWindowController, NSWindowDelegate,
|
||||
}
|
||||
}
|
||||
|
||||
func fixTabBar() {
|
||||
private func fixTabBar() {
|
||||
// We do this to make sure that the tab bar will always re-composite. If we don't,
|
||||
// then the it will "drag" pieces of the background with it when a transparent
|
||||
// window is moved around.
|
||||
|
@ -29,6 +29,7 @@ class TerminalWindow: NSWindow {
|
||||
|
||||
private var windowButtonsBackdrop: NSView? = nil
|
||||
private var windowDragHandle: WindowDragView? = nil
|
||||
private var storedTitlebarBackgroundColor: CGColor? = nil
|
||||
|
||||
// The tab bar controller ID from macOS
|
||||
static private let TabBarController = NSUserInterfaceItemIdentifier("_tabBarController")
|
||||
@ -65,8 +66,6 @@ class TerminalWindow: NSWindow {
|
||||
}
|
||||
}
|
||||
|
||||
private var storedTitlebarBackgroundColor: CGColor? = nil
|
||||
|
||||
// Assign a background color to the titlebar area.
|
||||
func setTitlebarBackground(_ color: CGColor) {
|
||||
storedTitlebarBackgroundColor = color
|
||||
@ -80,9 +79,8 @@ class TerminalWindow: NSWindow {
|
||||
}
|
||||
|
||||
// Make sure the titlebar has the assigned background color.
|
||||
func restoreTitlebarBackground() {
|
||||
private func restoreTitlebarBackground() {
|
||||
guard let color = storedTitlebarBackgroundColor else { return }
|
||||
|
||||
setTitlebarBackground(color)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user