[text] take text padding into account when in single line mode

In single line mode, extra padding is added to the text which must be
taken into account when reporting the natural size of the actor.
This commit is contained in:
Thomas Wood 2009-05-14 09:53:41 +01:00
parent 92e4391056
commit cd86e70f41

View File

@ -1439,7 +1439,12 @@ clutter_text_get_preferred_width (ClutterActor *self,
}
if (natural_width_p)
{
if (priv->editable && priv->single_line_mode)
*natural_width_p = layout_width + TEXT_PADDING * 2;
else
*natural_width_p = layout_width;
}
}
static void