Skip to content

make macos_titlebar_color=background support transparent - #8906

Merged
kovidgoyal merged 1 commit into
kovidgoyal:masterfrom
zzhaolei:titlebar_transparent
Aug 18, 2025
Merged

kovidgoyal merged 1 commit into
kovidgoyal:masterfrom
zzhaolei:titlebar_transparent

Conversation

@zzhaolei

Copy link
Copy Markdown
Contributor

before:
image

now:
image

conf:

background_opacity 0.2
macos_titlebar_color background

@zzhaolei

zzhaolei commented Aug 16, 2025

Copy link
Copy Markdown
Contributor Author

2025-08-16 22:09:35.633 kitty[38828:29026832] NSWindow warning: adding an unknown subview: <NSView: 0x1245ae8d0>. Break on NSLog to debug.

This will have a warning, maybe we should find a better way to implement it

edit: fixed

@zzhaolei

zzhaolei commented Aug 16, 2025

Copy link
Copy Markdown
Contributor Author

And when background_opacity is set to 0.2, the titlebar background color is inconsistent compared to when it is set to 1.0 after maximizing the kitty window. in kitty 0.42.2 and master.

@zzhaolei

Copy link
Copy Markdown
Contributor Author
image

with -o background_opacity=0.55 -o background_blur=20 -o macos_titlebar_color=background

@kovidgoyal

Copy link
Copy Markdown
Owner

I dont have time to look at it today but till I do, some questions:

  1. Does it work when resizing the window?
  2. What about fullscreen and back, with macos_traditional_fullscreen set to yes and no
  3. What happens if hide_window_decorations is set to yes, titlebar-only, titlebar-and-corners

@kovidgoyal

Copy link
Copy Markdown
Owner

Also, what happens if macos_titlebar_color is system and background_opacity < 1?

@zzhaolei

zzhaolei commented Aug 17, 2025

Copy link
Copy Markdown
Contributor Author
  1. Does it work when resizing the window?

It works.

But the title bar has a slight color difference, and the window background does not follow the background color when it is scaled, and is consistent with the background color after the scale is completed.
with -o background_opacity=1.0 -o background_blur=0 -o macos_titlebar_color=background and macos_titlebar_color system/light/dark

  1. What about fullscreen and back, with macos_traditional_fullscreen set to yes and no

all work(like kitty 0.42.2 release)

  1. What happens if hide_window_decorations is set to yes, titlebar-only, titlebar-and-corners

all work(like kitty 0.42.2 release)

Also, what happens if macos_titlebar_color is system and background_opacity < 1?

like kitty 0.42.2 release
image

@zzhaolei

Copy link
Copy Markdown
Contributor Author

But the title bar has a slight color difference, and the window background does not follow the background color when it is scaled, and is consistent with the background color after the scale is completed. with -o background_opacity=1.0 -o background_blur=0 -o macos_titlebar_color=background and macos_titlebar_color system/light/dark

The reason has not yet been discovered

@zzhaolei

zzhaolei commented Aug 17, 2025

Copy link
Copy Markdown
Contributor Author

and the window background does not follow the background color when it is scaled, and is consistent with the background color after the scale is completed

Building the master branch also produces the same issue, so this PR didn’t introduce it.

@kovidgoyal

kovidgoyal commented Aug 17, 2025 via email

Copy link
Copy Markdown
Owner

@zzhaolei

Copy link
Copy Markdown
Contributor Author

and the window background does not follow the background color when it is scaled, and is consistent with the background color after the scale is completed

Building the master branch also produces the same issue, so this PR didn’t introduce it.

but not in kitty 0.42.2 release.

kitty -o background_opacity=1.0 -o background_blur=0 -o macos_titlebar_color=background

@kovidgoyal

kovidgoyal commented Aug 18, 2025 via email

Copy link
Copy Markdown
Owner

@kovidgoyal
kovidgoyal merged commit c47e63c into kovidgoyal:master Aug 18, 2025
10 checks passed
@zzhaolei

zzhaolei commented Aug 18, 2025

Copy link
Copy Markdown
Contributor Author

I remember that when setting hide_window_decorations=titlebar-only, the titlebar was hidden but the traffic light buttons were still visible. However, now they no longer appear, though I’m not sure if I’m misremembering. The issue occurred before this PR was merged—I forgot to mention that earlier.

5662d04

Perfect fix.

@kovidgoyal

Copy link
Copy Markdown
Owner

As long as it is not happening now, good enough :)

@zzhaolei

Copy link
Copy Markdown
Contributor Author

No, I didn't make it clear. This pr did not introduce this problem. It now exists in master.

@kovidgoyal

Copy link
Copy Markdown
Owner

I dont follow. I ran on current master

kitty --config=NONE -o hide_window_decorations=titlebar-only

and I see no titlebar and no traffic light buttons. Is that not correct?

@zzhaolei

Copy link
Copy Markdown
Contributor Author

If this is what is expected, it is absolutely correct.

Something went wrong with my memory🥲

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants