Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transparent macos-titlebar-style not honoured when background is close to black #3424

Open
fionn opened this issue Dec 27, 2024 · 6 comments
Labels
gui GUI or app issue regardless of platform (i.e. Swift, GTK) needs-confirmation A reproduction has been reported, but the bug hasn't been confirmed or reproduced by a maintainer. os/macos

Comments

@fionn
Copy link

fionn commented Dec 27, 2024

When background = #0d0d0d (or brighter), the titlebar transparency works as expected.

When background = #0c0c0c (or darker), the titlebar is not transparent and behaves as if set to native.

Screenshots BrighterDarker
@mitchellh mitchellh added os/macos needs-confirmation A reproduction has been reported, but the bug hasn't been confirmed or reproduced by a maintainer. gui GUI or app issue regardless of platform (i.e. Swift, GTK) labels Dec 27, 2024
@qwerasd205
Copy link
Collaborator

This looks like it's the effect of some code that was added in f086bff to make sure it's possible to distinguish the currently selected tab on very dark backgrounds. It could be handled more gracefully than this though.

@fionn
Copy link
Author

fionn commented Dec 28, 2024

I think it's these two assignments, conditional on backgroundColor.luminance < 0.05.

let highlightedColor = terminalWindow.hasVeryDarkBackground ? terminalWindow.backgroundColor : .clear
let backgroundColor = terminalWindow.hasVeryDarkBackground ? titlebarBackgroundColor : systemOverlayColor

Selected tabs are distinguishable based on the colour of the title and indicator, so I think this isn't necessary -- especially given when macos-titlebar-style = tabs on a black background it works as expected.

@Absolpega
Copy link

this feels dumb
as a user I think I should be able to decide whether I can distinguish the tabs or not
there should at least be a warning in the man page about this

also one workaround is to set it to a bright value at launch but then change it back to a darker value and reload

@Fake-User
Copy link

I tried moving over from iterm, and this really stumped me for a hour till i found this issue. I had set my background to #000000 like I usually do, and couldn't figure out why macos-titlebar-style = transparent wasn't doing anything. changing the background to #0d0d0d or brighter does let the title bar be transparent, but its still not what i was hoping for.

Image

@J-Siu
Copy link

J-Siu commented Jan 28, 2025

@Fake-User Try:

theme = dark:iTerm2 Default,light:iTerm2 Default
background-opacity = 0.85
macos-titlebar-style = tabs

@Fake-User
Copy link

@J-Siu
seems to work correctly with macos-titlebar-style = tabs
many thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gui GUI or app issue regardless of platform (i.e. Swift, GTK) needs-confirmation A reproduction has been reported, but the bug hasn't been confirmed or reproduced by a maintainer. os/macos
Projects
None yet
Development

No branches or pull requests

6 participants