-
Notifications
You must be signed in to change notification settings - Fork 797
gtk: add option to always display the tab bar #5590
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One request.
I also want to consider a bike shed on the config option. I wonder if we want to rename it to something like window-tab-bar
and support like auto, always
right now. There's some requests to have never
already (weird but exist) and while I dont' want to support it now it'd let us reuse that config one day.
src/config/Config.zig
Outdated
/// Whether tabs should always be displayed, regardless of how many tabs | ||
/// are open. If false (default), the tab bar is only displayed when there | ||
/// are two or more tabs. | ||
@"window-always-show-tabs": bool = false, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should note it's only GTK for now. This has been requested on macOS as well so I'm interested in making it work there eventually.
Why would you want to have it as |
5909070
to
ca2f90e
Compare
So I've been thinking about this for a while, and I think it might be worthwhile to reorganize the config options pertaining to tab bars:
|
I can answer that. I prefer either slim tabs or none if it's drawn by libadwaita. My personal issue with libadwaita is the vertical space it requires for tabs (CSD and SSD), and that it doesn't respect (prob can't) what I have otherwise configured as GTK theme. Another, hopefully temporary, reason is that if tabs are always hidden (or always shown), it would remove a second cause of stretching other than using a tiling compositor. |
Note you can also attempt to slim them down using our |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small change request but the rest looks good. Feel free to merge at your desire if you feel its stable.
I'm still not sure about the |
ca2f90e
to
e97a474
Compare
Isn't libadwaita going to be hard dependency in the future? That's what I remember from the release notes. It's why I re-enabled it in my 1.1.0 build. |
Yeah - the difference is that on libadwaita |
/// overview or by keybind actions. | ||
/// | ||
/// Currently only supported on Linux (GTK). | ||
@"window-show-tab-bar": WindowShowTabBar = .auto, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we just remove gtk-tabs-location=hidden
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO probably yeah, but then we need to have a migration mechanism for people who are using that config. (See, I did tell everyone that we might run into more complex config migrations in the future 😅)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After trying that out, I must revise my comment above and state that I find hidden tabs less practical than large tabs. Not sure why I thought it wouldn't be fully hidden or maybe auto-hidden. Sorry folks, my bad, thanks for listening to my opinion. I'll experiment with CSS.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This LGTM except that it needs rebased now that adwaita is required.
@pluiedev Hi, could you please rebase this PR? |
Also fixes crashes in both vanilla GTK and Adwaita implementations of `closeTab`, which erroneously close windows twice when there are no more tabs left (we probably already handle it somewhere else).
e97a474
to
acbca59
Compare
Rebased and replaced |
aha, conflicts again. |
Also fixes crashes in both vanilla GTK and Adwaita implementations of
closeTab
, which erroneously close windows twice when there are no more tabs left (we probably already handle it somewhere else).