text: Bump up the preferred height

Instead of returning a sub-pixel height round up the preferred height to
the nearest integral value that is not less than the size reported by
Pango, once converted in pixels.
This commit is contained in:
Emmanuele Bassi 2010-02-10 15:38:41 +00:00
parent f54b29a0c0
commit 4208169ab4

View File

@ -1853,7 +1853,7 @@ clutter_text_get_preferred_height (ClutterActor *self,
* the height accordingly
*/
logical_height = logical_rect.y + logical_rect.height;
layout_height = (gfloat) logical_height / 1024.0f;
layout_height = ceilf ((gfloat) logical_height / 1024.0f + 0.5);
if (min_height_p)
{