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 660649 - natural_width is overlooked for tab labels
natural_width is overlooked for tab labels
Status: RESOLVED OBSOLETE
Product: gtk+
Classification: Platform
Component: Widget: GtkNotebook
3.0.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2011-10-01 20:04 UTC by Tony Houghton
Modified: 2018-02-10 03:31 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Demonstrates undersized tab label (1.02 KB, text/x-c)
2011-10-01 20:05 UTC, Tony Houghton
Details

Description Tony Houghton 2011-10-01 20:04:46 UTC
When allocating space to a tab label GtkNotebook fails to use the label's natural_width request and only allocates enough space for its minimum_width even though there is plenty of spare space available. This is obviously a problem for ellipsizable labels, as demonstrated by the attachment tabdemo.c.

The bug came to my attention with GTK 3.0.12, but I've also tested 3.3.1 using jhbuild, and that had the same problem despite release notes for 3.2.0 saying width-for-height had been implemented in 3.2.0.

One obvious workaround is to set the "tab-expand" and "tab-fill" child properties, but that looks quite silly/ugly if you have a single tab taking up the entire width of the window. Gnome-terminal avoids that by hiding the tab bar in windows containing only one terminal, but that has side-effects if the bar is shown or hidden while the window is maximized.

See also <http://mail.gnome.org/archives/gtk-devel-list/2011-September/msg00214.html>
Comment 1 Tony Houghton 2011-10-01 20:05:56 UTC
Created attachment 197979 [details]
Demonstrates undersized tab label
Comment 2 Matthias Clasen 2011-10-07 19:20:52 UTC
This is not directly related to wfh, but yes, it is a well-known problem for notebook tabs.
Comment 3 Matthias Clasen 2018-02-10 03:31:39 UTC
We're moving to gitlab! As part of this move, we are closing bugs that haven't seen activity in more than 5 years. If this issue is still imporant to you and
still relevant with GTK+ 3.22 or master, please consider creating a gitlab issue
for it.