[ClutterText] Return 1 for min width when editable

Editable ClutterText will scroll when allocated less width than is
necessary to lay out the entire layout on a single line, so return 1 for
the minimum width in this case.

Approved by Emmanuele Bassi, fixes bug #1555.
This commit is contained in:
Chris Lord 2009-04-16 16:34:15 +01:00
parent 425fa78a27
commit 56ac4baf17

View File

@ -1415,7 +1415,7 @@ clutter_text_get_preferred_width (ClutterActor *self,
if (min_width_p)
{
if (priv->wrap || priv->ellipsize)
if (priv->wrap || priv->ellipsize || priv->editable)
*min_width_p = 1;
else
*min_width_p = layout_width;