From 4208169ab48795ca8f10287bd67031e161bf1f82 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Wed, 10 Feb 2010 15:38:41 +0000 Subject: [PATCH] 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. --- clutter/clutter-text.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clutter/clutter-text.c b/clutter/clutter-text.c index 0d4cc1752..09f5e0be5 100644 --- a/clutter/clutter-text.c +++ b/clutter/clutter-text.c @@ -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) {