mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-09-29 22:48:37 +00:00
config: macos-titlebar-style, remove titlebar-tabs option
Fixes #1833 This is an attempt to simplify the logic that has organically grown convoluted over time with regards to how the titlebar and tab bar is styled. This field is one unified field that ONLY addresses titlebar and tab bar styling. It can be one of "native", "transparent", or "tabs". The "native" field is the new behavior in this commit: it makes the titlebar and tab bar appearance be absolutely native. We do not color anything (if we do its a bug). The "transparent" option is the previous `macos-titlebar-tabs = false` setting where the titlebar/tab bar is native but colored according to the window background color. The "tabs" option is `macos-titlebar-tabs = true`. The `window-theme = auto` affect on titlebar appearance has been removed. Now, the titlebar will NEVER be styled with "native" and MAY be styled with "transparent" and will ALWAYS be styled with "tabs" (since that's a totally custom look anyways).
This commit is contained in:
@@ -228,12 +228,14 @@ extension Ghostty {
|
||||
return String(cString: ptr)
|
||||
}
|
||||
|
||||
var macosTitlebarTabs: Bool {
|
||||
guard let config = self.config else { return false }
|
||||
var v = false;
|
||||
let key = "macos-titlebar-tabs"
|
||||
_ = ghostty_config_get(config, &v, key, UInt(key.count))
|
||||
return v
|
||||
var macosTitlebarStyle: String {
|
||||
let defaultValue = "transparent"
|
||||
guard let config = self.config else { return defaultValue }
|
||||
var v: UnsafePointer<Int8>? = nil
|
||||
let key = "macos-titlebar-style"
|
||||
guard ghostty_config_get(config, &v, key, UInt(key.count)) else { return defaultValue }
|
||||
guard let ptr = v else { return defaultValue }
|
||||
return String(cString: ptr)
|
||||
}
|
||||
|
||||
var backgroundColor: Color {
|
||||
|
Reference in New Issue
Block a user