From 9f0842bacb8facb564e811f02c838641cd9ae1bf Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Tue, 23 Sep 2008 11:11:14 +0000 Subject: [PATCH] 2008-09-23 Emmanuele Bassi Bug 1125 - Save an extra pango_layout_get_size in many cases * clutter/clutter-label.c: (clutter_label_create_layout_no_cache): Add a simple check before calling pango_layout_get_size(). (Johan Bilien) --- ChangeLog | 8 ++++++++ clutter/clutter-label.c | 3 ++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index e33566e23..31e0a6e8a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-09-23 Emmanuele Bassi + + Bug 1125 - Save an extra pango_layout_get_size in many cases + + * clutter/clutter-label.c: + (clutter_label_create_layout_no_cache): Add a simple check + before calling pango_layout_get_size(). (Johan Bilien) + 2008-09-23 Emmanuele Bassi * clutter/clutter-alpha.c: diff --git a/clutter/clutter-label.c b/clutter/clutter-label.c index 2ab3d0c73..8c1cfec08 100644 --- a/clutter/clutter-label.c +++ b/clutter/clutter-label.c @@ -154,7 +154,8 @@ clutter_label_create_layout_no_cache (ClutterLabel *label, pango_layout_set_markup (layout, priv->text, -1); } - if (allocation_width > 0) + if (allocation_width > 0 && + (priv->ellipsize != PANGO_ELLIPSIZE_NONE || priv->wrap)) { int layout_width, layout_height;