Skip to content

Conversation

jcollie
Copy link
Member

@jcollie jcollie commented Aug 6, 2025

This PR adds a "tabs" title bar style similar to the macOS title bar style. When gtk-titlebar-style=tabs the title bar and the tab bar will be merged together.

The config entry for controlling this is kept separate from macOS as macOS has more styles defined that don't map to a GTK title bar style and it's likely that users that use both macOS and GTK would want different settings for each platform.

Screenshot From 2025-08-06 16-38-28

@jcollie jcollie requested a review from a team as a code owner August 6, 2025 23:46
@00-kat 00-kat added os/linux gui GUI or app issue regardless of platform (i.e. Swift, GTK) labels Aug 7, 2025
@tristan957
Copy link
Member

can we unify macos-titlebar-style and gtk-titlebar-style?

@jcollie
Copy link
Member Author

jcollie commented Aug 7, 2025

can we unify macos-titlebar-style and gtk-titlebar-style?

IMHO, no. The default for macos-titlebar-style is transparent, which is basically equivalent to window-theme=ghostty on GTK. Then there is the macOS style "hidden", which is kinda equivalent to gtk-titlebar=false (but there's going to be interactions with window-decoration and client side/server side decorations).

We'd need to rethink how all of these interact to give people the effect that they are looking for.

Copy link
Contributor

@mitchellh mitchellh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a red review so I can review before merge. Thanks

@tristan957
Copy link
Member

can we unify macos-titlebar-style and gtk-titlebar-style?

IMHO, no. The default for macos-titlebar-style is transparent, which is basically equivalent to window-theme=ghostty on GTK. Then there is the macOS style "hidden", which is kinda equivalent to gtk-titlebar=false (but there's going to be interactions with window-decoration and client side/server side decorations).

We'd need to rethink how all of these interact to give people the effect that they are looking for.

Maybe something to rethink for 1.2 and just slide on this.

Copy link
Contributor

@mitchellh mitchellh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, got a real review in. Clean!

@mitchellh
Copy link
Contributor

can we unify macos-titlebar-style and gtk-titlebar-style?

I agree with jcollie: no... for now at least. I think GUI systems across platforms are distinct enough that unifying styling configuration is going to be a challenge in addition to I think probably just not being desirable. I think the configuration quirks per platform are too vast (there'd be too many "asterisks" on each option) and stylistically it doesn't make sense to support every style on every platform because they just culturally are different in style.

@jcollie jcollie force-pushed the gtk-ng-titlebar-style-tabs branch from 99af57d to 3db1934 Compare August 7, 2025 16:34
@jcollie jcollie force-pushed the gtk-ng-titlebar-style-tabs branch 2 times, most recently from 4a12775 to 63fb2cd Compare August 7, 2025 18:08
This PR adds a "tabs" title bar style similar to the macOS title bar
style. When `gtk-titlebar-style=tabs` the title bar and the tab bar
will be merged together.

The config entry for controlling this is kept separate from macOS as
macOS has more styles defined that don't map to a GTK title bar style
and it's likely that users that use both macOS and GTK would want
different settings for each platform.
@jcollie jcollie force-pushed the gtk-ng-titlebar-style-tabs branch from 63fb2cd to 0f67282 Compare August 8, 2025 18:32
Copy link
Contributor

@mitchellh mitchellh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One tiny request

Copy link
Contributor

@mitchellh mitchellh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified Valgrind on my end

@mitchellh mitchellh merged commit 1710129 into ghostty-org:main Aug 8, 2025
42 checks passed
@github-actions github-actions bot added this to the 1.2.0 milestone Aug 8, 2025
@jcollie jcollie deleted the gtk-ng-titlebar-style-tabs branch August 8, 2025 19:44
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) os/linux
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants