[text] Do not ellipsize non-editable layouts

If a ClutterText is set as non-editable then its PangoLayout
will occupy as much width as its contents and ignore the
ellipsization setting.
This commit is contained in:
Emmanuele Bassi 2009-04-15 17:23:45 +01:00
parent 5af99660cb
commit f8256e4b23

View File

@ -288,14 +288,14 @@ clutter_text_create_layout_no_cache (ClutterText *text,
pango_layout_get_size (layout, &layout_width, &layout_height);
/* No need to set ellipsize or wrap if we already have enough
/* no need to set ellipsize or wrap if we already have enough
* space, since we don't want to make the layout wider than it
* would be otherwise.
*/
if (CLUTTER_UNITS_FROM_PANGO_UNIT (layout_width) > allocation_width)
{
if (priv->ellipsize != PANGO_ELLIPSIZE_NONE)
if (!priv->editable && priv->ellipsize != PANGO_ELLIPSIZE_NONE)
{
gint width;