mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-16 16:56:09 +03:00
Merge pull request #1526 from tt/avoid-repainting-new-tab-button-for-native-tab-bar
Avoid repainting new tab button for native tab bar
This commit is contained in:
@ -16,12 +16,18 @@ class TerminalWindow: NSWindow {
|
||||
}
|
||||
|
||||
super.becomeKey()
|
||||
updateNewTabButtonOpacity()
|
||||
|
||||
if titlebarTabs {
|
||||
updateNewTabButtonOpacity()
|
||||
}
|
||||
}
|
||||
|
||||
override func resignKey() {
|
||||
super.resignKey()
|
||||
updateNewTabButtonOpacity()
|
||||
|
||||
if titlebarTabs {
|
||||
updateNewTabButtonOpacity()
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Titlebar Tabs
|
||||
@ -211,6 +217,8 @@ class TerminalWindow: NSWindow {
|
||||
override func 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
|
||||
// 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
|
||||
|
@ -50,8 +50,9 @@ pub const BuildConfig = struct {
|
||||
step.addOption(bool, "wasm_shared", self.wasm_shared);
|
||||
|
||||
// Our version. We also add the string version so we don't need
|
||||
// to do any allocations at runtime.
|
||||
var buf: [64]u8 = undefined;
|
||||
// to do any allocations at runtime. This has to be long enough to
|
||||
// accomodate realistic large branch names for dev versions.
|
||||
var buf: [1024]u8 = undefined;
|
||||
step.addOption(std.SemanticVersion, "app_version", self.version);
|
||||
step.addOption([:0]const u8, "app_version_string", try std.fmt.bufPrintZ(
|
||||
&buf,
|
||||
|
Reference in New Issue
Block a user