From bdd9cae5e97a4421a2eff03ca83e2bb8931a59b4 Mon Sep 17 00:00:00 2001 From: Chris Toshok Date: Mon, 9 Dec 2002 23:30:30 +0000 Subject: rework this to be faster and deal more correctly with the ellipsis. 2002-12-09 Chris Toshok * e-clipped-label.[ch]: rework this to be faster and deal more correctly with the ellipsis. svn path=/trunk/; revision=19076 --- widgets/misc/e-clipped-label.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'widgets/misc/e-clipped-label.h') diff --git a/widgets/misc/e-clipped-label.h b/widgets/misc/e-clipped-label.h index 6649fee366..ab0d741ebf 100644 --- a/widgets/misc/e-clipped-label.h +++ b/widgets/misc/e-clipped-label.h @@ -51,9 +51,17 @@ struct _EClippedLabel gchar *label; + /* Our PangoLayout */ + PangoLayout *layout; + /* This is the width of the entire label string, in pixels. */ gint label_width; + /* This is the label's y coord. we store it here so it won't + change as the label's baseline changes (for example if we + ellide the 'y' from 'Summary' the baseline drops) */ + gint label_y; + /* This is the number of characters we can fit in, or E_CLIPPED_LABEL_NEED_RECALC if it needs to be recalculated, or E_CLIPPED_LABEL_SHOW_ENTIRE_LABEL to show the entire label. */ @@ -62,6 +70,9 @@ struct _EClippedLabel /* This is the x position to display the ellipsis string, e.g. '...', relative to the start of the label. */ gint ellipsis_x; + + /* This is the width of the ellipsis, in pixels */ + gint ellipsis_width; }; struct _EClippedLabelClass -- cgit v1.2.3