After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 636470 - Can't make a single tab look good
Can't make a single tab look good
Status: RESOLVED NOTGNOME
Product: gtk+
Classification: Platform
Component: Widget: GtkNotebook
2.22.x
Other Linux
: Normal minor
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2010-12-04 18:19 UTC by Tony Houghton
Modified: 2011-08-09 23:46 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Tony Houghton 2010-12-04 18:19:09 UTC
I want GtkNotebook's tab bar to automatically behave more like Firefox's (all tabs have a fixed width regardless of their number and the length of their labels, which are ellipsized if necessary), but I can't even force it to do so by changing properties on the fly, let alone have it happen automatically.

I'm the developer of roxterm, which is a bit like gnome-terminal. You're probably aware that when a gnome-terminal window contains a single terminal the notebook's tab bar is hidden. This results in resizing when adding and removing tabs, which can cause problems (especially when maximized) so I added an option in roxterm to always show the tab bar even if there's only one tab.

To avoid unwanted resizing I've had to make the tab bar scrollable. To deal with very long labels I've also had to make their labels ellipsizable, both to avoid unwanted resizing and to avoid one tab hogging all the space. This is a bit of a problem. If I don't make the notebook homogeneous and/or set "tab-expand" and "tab-fill" to TRUE on all the children they all take up the minimum size possible with their labels fully ellipsized. That's no good.

If I do set the above properties to TRUE, that's OK, except that when there's a single tab it takes up the entire width of the window and it looks silly. So I tried setting the properties to FALSE for a single tab and giving its label a fixed width, then changing the properties to TRUE if and when more tabs are added. This doesn't work properly: the labels all fail to ellipsize. For this reason I've chosen a severity level for a bug rather than an enhancement.
Comment 1 Tony Houghton 2011-08-09 23:46:19 UTC
I think I was failing to set the tab-expand child properties consistently. It's now working correctly in gtk2 and gtk3.