[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:
parent
92e4391056
commit
cd86e70f41
@ -1439,7 +1439,12 @@ clutter_text_get_preferred_width (ClutterActor *self,
|
||||
}
|
||||
|
||||
if (natural_width_p)
|
||||
*natural_width_p = layout_width;
|
||||
{
|
||||
if (priv->editable && priv->single_line_mode)
|
||||
*natural_width_p = layout_width + TEXT_PADDING * 2;
|
||||
else
|
||||
*natural_width_p = layout_width;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
Reference in New Issue
Block a user