From c3dbd324620d9a8fd1d2e32846dd6d511a9eeb1a Mon Sep 17 00:00:00 2001 From: Troels Thomsen Date: Fri, 9 Feb 2024 22:02:34 +0100 Subject: [PATCH 1/2] Keep shadows for native tab bar --- macos/Sources/Features/Terminal/TerminalWindow.swift | 2 ++ 1 file changed, 2 insertions(+) diff --git a/macos/Sources/Features/Terminal/TerminalWindow.swift b/macos/Sources/Features/Terminal/TerminalWindow.swift index 457b3bd08..6defc1158 100644 --- a/macos/Sources/Features/Terminal/TerminalWindow.swift +++ b/macos/Sources/Features/Terminal/TerminalWindow.swift @@ -40,6 +40,8 @@ class TerminalWindow: NSWindow { override func updateConstraintsIfNeeded() { super.updateConstraintsIfNeeded() + guard titlebarTabs else { return } + guard let titlebarContainer = contentView?.superview?.subviews.first(where: { $0.className == "NSTitlebarContainerView" }) else { return } From 56b453a93faae69f40162ce7a2bd529b2ccb1d06 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Fri, 9 Feb 2024 14:22:21 -0800 Subject: [PATCH 2/2] macos: comment why we guard --- macos/Sources/Features/Terminal/TerminalWindow.swift | 2 ++ 1 file changed, 2 insertions(+) diff --git a/macos/Sources/Features/Terminal/TerminalWindow.swift b/macos/Sources/Features/Terminal/TerminalWindow.swift index 6defc1158..f65aaceaf 100644 --- a/macos/Sources/Features/Terminal/TerminalWindow.swift +++ b/macos/Sources/Features/Terminal/TerminalWindow.swift @@ -40,6 +40,8 @@ class TerminalWindow: NSWindow { override func updateConstraintsIfNeeded() { super.updateConstraintsIfNeeded() + // For titlebar tabs, we want to hide the separator view so that we get rid + // of an aesthetically unpleasing shadow. guard titlebarTabs else { return } guard let titlebarContainer = contentView?.superview?.subviews.first(where: {