gtk: add option to always display the tab bar
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).
Why would you want to have it as never... 🤦♀️ Though I guess it's not that hard to implement
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:
-
window-tab-bar=auto,always,none-
autois behavior we have right now, andnonehas roughly the same effect asgtk-tabs-location=hidden, but the tab bar is merely hidden instead of not being attached
-
-
window-tab-bar-position=top,bottom, (left,right?)- AFAICT macOS currently only supports
topdue to native tabbing limitations, butbottomcould be supported when we move to a custom tabbing solution.leftandrightaren't included by default as it's not a design that libadwaita supports natively, but we could devise a hack later using something likeAdwOverlaySplitViewwith the sidebar always visible.
- AFAICT macOS currently only supports
-
Remove
gtk-tabs-locationand supersede it with the above two options
Why would you want to have it as
never... 🤦♀️ Though I guess it's not that hard to implement
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.
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.
Note you can also attempt to slim them down using our gtk-custom-css configuration option. I haven't verified if its possible or how easy it is, but on paper it should be possible.
I'm still not sure about the never case as it does basically the same (or even exactly the same when libadwaita is disabled) thing as gtk-tabs-location=hidden... Though I'm fine with only merging the always option
I'm still not sure about the
nevercase as it does basically the same (or even exactly the same when libadwaita is disabled) thing
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 gtk-tabs-location=hidden we display the number of tabs in a tab button, whereas window-tab-bar=never doesn't. I find that kinda silly...
@pluiedev Hi, could you please rebase this PR?
Rebased and replaced gtk-tabs-location=hidden with window-show-tab-bar=never. This is obviously a breaking change but we can add a migration mechanism in a different PR
aha, conflicts again.
@mitchellh could you take a look at this long waited feature?
Rebased and replaced
gtk-tabs-location=hiddenwithwindow-show-tab-bar=never. This is obviously a breaking change but we can add a migration mechanism in a different PR
found why it broke my config haha
Oh good catch.
Made #7706 to track that.