[clutter-text] Fix ellipsizing

Ellipsizing was effectively broken for two reasons. There was a typo
in the code to set the width so it always ended up being some massive
value. If no height should be set on the layout it was being set to
G_MAXINT. Setting a height greater than 0 enables wrapping which so
ellipsizing is not performed. It should be left at the default of -1
instead.
This commit is contained in:
Neil Roberts 2009-04-15 14:46:45 +01:00
parent d7ce56bb46
commit fbd9c59c7c

View File

@ -333,7 +333,7 @@ clutter_text_create_layout_no_cache (ClutterText *text,
gint width;
width = allocation_width > 0
? CLUTTER_UNITS_FROM_PANGO_UNIT (allocation_width)
? CLUTTER_UNITS_TO_PANGO_UNIT (allocation_width)
: -1;
pango_layout_set_width (layout, width);
@ -360,8 +360,6 @@ clutter_text_create_layout_no_cache (ClutterText *text,
pango_layout_set_height (layout, height);
}
else
pango_layout_set_height (layout, G_MAXINT);
return layout;
}