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 508242 - Rotated GtkLabel doesn't support ellipses and wrapping
Rotated GtkLabel doesn't support ellipses and wrapping
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkLabel
2.12.x
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on: 508002
Blocks:
 
 
Reported: 2008-01-09 08:46 UTC by Mathias Hasselmann (IRC: tbf)
Modified: 2010-05-22 03:22 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
[PATCH] Support ellipses and wrapping for labels of any angle (#508242). (19.44 KB, patch)
2008-01-09 08:54 UTC, Mathias Hasselmann (IRC: tbf)
none Details | Review

Description Mathias Hasselmann (IRC: tbf) 2008-01-09 08:46:03 UTC
GtkLabel explicitly ignores ellipsize and wrapping settings for rotated text. During GUADEC/Extend Layout work I've cooked the attached code to fix the problem.
Comment 1 Mathias Hasselmann (IRC: tbf) 2008-01-09 08:54:20 UTC
Created attachment 102447 [details] [review]
[PATCH] Support ellipses and wrapping for labels of any angle (#508242).


* gtk/gtklabel.h, gtk/gtk.symbols: Add "full-size" property.
* gtk/gtklabel.c: Change gtk_label_ensure_layout(),
gtk_label_size_request() and gtk_label_size_allocate() to support
ellipses and wrapping at any angle. Add "full-size" property.
* tests/testellipsise.c: Update to test ellipses at random angles.
---
 ChangeLog             |   10 ++
 gtk/gtk.symbols       |    2 +
 gtk/gtklabel.c        |  223 +++++++++++++++++++++++++++++++++++++------------
 gtk/gtklabel.h        |    3 +
 tests/testellipsise.c |  112 +++++++++++++++++++++++--
 5 files changed, 289 insertions(+), 61 deletions(-)
Comment 2 Mathias Hasselmann (IRC: tbf) 2008-01-09 08:56:22 UTC
I absolutely hate the "full-size" property hack for overriding all those width-chars, max-width-chars and screen size based wrapping constraints. Maybe someone has a better idea for expressing that override. Well, or at least a better property name.
Comment 3 Mathias Hasselmann (IRC: tbf) 2008-01-09 08:58:18 UTC
The updated version of test/testellipses also exposes bug 508002.
Comment 4 Mathias Hasselmann (IRC: tbf) 2008-01-09 09:07:48 UTC
Bah... Cross dependency to natural size stuff: testellipses doesn't show much useful, without natural size support.
Comment 5 Behdad Esfahbod 2008-01-09 17:42:52 UTC
Wait a day for pango_layout_set_heigh().  May help.
Comment 6 Behdad Esfahbod 2008-01-22 02:10:09 UTC
For reference, pango_layout_set_height() is in pango now.  Just that it has some bugs still...
Comment 7 Matthias Clasen 2010-05-22 03:22:35 UTC
This has been fixed as part of the extended layout work.