mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-08-02 14:57:31 +03:00
fixup! feat: add macos-title-bar-luminance-check
This commit is contained in:
@ -151,7 +151,7 @@ class TerminalWindow: NSWindow {
|
|||||||
if let titlebarContainer = contentView?.superview?.subviews.first(where: {
|
if let titlebarContainer = contentView?.superview?.subviews.first(where: {
|
||||||
$0.className == "NSTitlebarContainerView"
|
$0.className == "NSTitlebarContainerView"
|
||||||
}), let effectView = titlebarContainer.descendants(withClassName: "NSVisualEffectView").first {
|
}), let effectView = titlebarContainer.descendants(withClassName: "NSVisualEffectView").first {
|
||||||
effectView.isHidden = titlebarTabs || !titlebarTabs && !hasVeryDarkBackground && !titleBarLuminanceCheck
|
effectView.isHidden = titlebarTabs || titleBarLuminanceCheck && !titlebarTabs && !hasVeryDarkBackground
|
||||||
}
|
}
|
||||||
|
|
||||||
effectViewIsHidden = true
|
effectViewIsHidden = true
|
||||||
@ -189,7 +189,7 @@ class TerminalWindow: NSWindow {
|
|||||||
backgroundColor.luminance < 0.05
|
backgroundColor.luminance < 0.05
|
||||||
}
|
}
|
||||||
|
|
||||||
var titleBarLuminanceCheck: Bool
|
var titleBarLuminanceCheck: Bool = true
|
||||||
|
|
||||||
private var newTabButtonImageLayer: VibrantLayer? = nil
|
private var newTabButtonImageLayer: VibrantLayer? = nil
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user