mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-08-02 14:57:31 +03:00
Avoid repainting new tab button for native tab bar
This commit is contained in:

committed by
Mitchell Hashimoto

parent
5db59ebb64
commit
a874280e4b
@ -16,12 +16,18 @@ class TerminalWindow: NSWindow {
|
|||||||
}
|
}
|
||||||
|
|
||||||
super.becomeKey()
|
super.becomeKey()
|
||||||
updateNewTabButtonOpacity()
|
|
||||||
|
if titlebarTabs {
|
||||||
|
updateNewTabButtonOpacity()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override func resignKey() {
|
override func resignKey() {
|
||||||
super.resignKey()
|
super.resignKey()
|
||||||
updateNewTabButtonOpacity()
|
|
||||||
|
if titlebarTabs {
|
||||||
|
updateNewTabButtonOpacity()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// MARK: - Titlebar Tabs
|
// MARK: - Titlebar Tabs
|
||||||
@ -211,6 +217,8 @@ class TerminalWindow: NSWindow {
|
|||||||
override func update() {
|
override func update() {
|
||||||
super.update()
|
super.update()
|
||||||
|
|
||||||
|
guard titlebarTabs else { return }
|
||||||
|
|
||||||
// This is called when we open, close, switch, and reorder tabs, at which point we determine if the
|
// This is called when we open, close, switch, and reorder tabs, at which point we determine if the
|
||||||
// first tab in the tab bar is selected. If it is, we make the `windowButtonsBackdrop` color the same
|
// first tab in the tab bar is selected. If it is, we make the `windowButtonsBackdrop` color the same
|
||||||
// as that of the active tab (i.e. the titlebar's background color), otherwise we make it the same
|
// as that of the active tab (i.e. the titlebar's background color), otherwise we make it the same
|
||||||
|
Reference in New Issue
Block a user