mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-08-02 14:57:31 +03:00
Color after setting window theme and tab mode
This commit is contained in:
@ -259,13 +259,6 @@ class TerminalController: NSWindowController, NSWindowDelegate,
|
||||
// when cascading.
|
||||
window.center()
|
||||
|
||||
// Set the background color of the window
|
||||
let backgroundColor = NSColor(ghostty.config.backgroundColor)
|
||||
window.backgroundColor = backgroundColor
|
||||
|
||||
// This makes sure our titlebar renders correctly when there is a transparent background
|
||||
window.titlebarColor = backgroundColor.withAlphaComponent(ghostty.config.backgroundOpacity)
|
||||
|
||||
// Make sure our theme is set on the window so styling is correct.
|
||||
if let windowTheme = ghostty.config.windowTheme {
|
||||
window.windowTheme = .init(rawValue: windowTheme)
|
||||
@ -282,6 +275,13 @@ class TerminalController: NSWindowController, NSWindowDelegate,
|
||||
}
|
||||
}
|
||||
|
||||
// Set the background color of the window
|
||||
let backgroundColor = NSColor(ghostty.config.backgroundColor)
|
||||
window.backgroundColor = backgroundColor
|
||||
|
||||
// This makes sure our titlebar renders correctly when there is a transparent background
|
||||
window.titlebarColor = backgroundColor.withAlphaComponent(ghostty.config.backgroundOpacity)
|
||||
|
||||
// Initialize our content view to the SwiftUI root
|
||||
window.contentView = NSHostingView(rootView: TerminalView(
|
||||
ghostty: self.ghostty,
|
||||
|
Reference in New Issue
Block a user