projects
/
profile
/
ivi
/
clutter.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
92e4391
)
[text] take text padding into account when in single line mode
author
Thomas Wood
<thomas.wood@intel.com>
Thu, 14 May 2009 08:53:41 +0000
(09:53 +0100)
committer
Thomas Wood
<thomas.wood@intel.com>
Thu, 14 May 2009 12:31:20 +0000
(13:31 +0100)
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
patch
|
blob
|
history
diff --git
a/clutter/clutter-text.c
b/clutter/clutter-text.c
index
5b0aa14
..
6b1d693
100644
(file)
--- 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