From cd86e70f4150505a035ea074aed06e4bd3fbb9df Mon Sep 17 00:00:00 2001 From: Thomas Wood Date: Thu, 14 May 2009 09:53:41 +0100 Subject: [PATCH] [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. --- clutter/clutter-text.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/clutter/clutter-text.c b/clutter/clutter-text.c index 5b0aa1422..6b1d693f9 100644 --- a/clutter/clutter-text.c +++ b/clutter/clutter-text.c @@ -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