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 71742 - Improve GtkLabel behavior when it receives a too-small size allocation
Improve GtkLabel behavior when it receives a too-small size allocation
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: Other
1.3.x
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2002-02-17 05:57 UTC by Havoc Pennington
Modified: 2011-02-04 16:11 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch for gtklabel.c (725 bytes, patch)
2002-05-02 17:42 UTC, Sven Neumann
none Details | Review
fix that works with RTL + does the same thing vertically (1.24 KB, patch)
2002-06-01 19:06 UTC, Soren Sandmann Pedersen
none Details | Review
A version that compiles (1.25 KB, patch)
2002-06-01 19:40 UTC, Soren Sandmann Pedersen
none Details | Review

Description Havoc Pennington 2002-02-17 05:57:00 UTC
Yeah, one shouldn't ever get a too-small size but in practice sometimes
it matters.

The simplest fix is that the X position of the text should be clamped to 0
(never go negative) so that clipping is all on one side of the label. 
Then eventually ellipsization should automatically kick in if 
our allocation is too small.

Right now the behavior is that both ends of the label are chopped off,
which is never useful.
Comment 1 Owen Taylor 2002-03-25 23:30:38 UTC
Moving non-critical and hard-to-fix bugs to 2.0.2
Comment 2 Matthias Clasen 2002-04-05 13:33:23 UTC
Move open bugs from milestones 2.0.[012] -- > 2.0.3, since 2.0.2 is already out.
Comment 3 Sven Neumann 2002-05-02 17:42:27 UTC
Created attachment 8126 [details] [review]
patch for gtklabel.c
Comment 4 Sven Neumann 2002-05-02 17:43:22 UTC
It looks naive, but the attached patch seems to work fine for me.
Comment 5 Owen Taylor 2002-05-14 22:23:26 UTC
Needs to do the opposite thing in RTL mode
Comment 6 Soren Sandmann Pedersen 2002-06-01 19:06:10 UTC
Created attachment 8927 [details] [review]
fix that works with RTL + does the same thing vertically
Comment 7 Soren Sandmann Pedersen 2002-06-01 19:40:24 UTC
Created attachment 8929 [details] [review]
A version that compiles
Comment 8 Owen Taylor 2002-06-13 16:40:31 UTC
Please commit to HEAD. (Probably perfectly fine for 2.0.x,
but I'm being conservative right now.)
Comment 9 Owen Taylor 2002-08-05 21:22:48 UTC
Applied. I don't think we'll forget about adding ellipsization
support to GtkLabel when we have ellipsization support in
Pango, so I'm going to close the bug.

Mon Aug  5 17:20:45 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtklabel.c: Patch from Soeren Sandmann
        to improve GtkLabel behavior when it gets
        a too small allocation. (Always display the
        initial portion.) (#71742)