From a6c7ce7117e77a8d7fde17aa0e871be2650a9396 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Wed, 9 Jan 2008 11:00:54 +0000 Subject: [PATCH] 2008-01-09 Emmanuele Bassi * clutter/clutter-label.c: (clutter_label_ensure_layout): Fix the ClutterUnits to Pango scale conversion. --- ChangeLog | 6 ++++++ clutter/clutter-label.c | 8 ++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 739f53e4e..7478ab872 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-01-09 Emmanuele Bassi + + * clutter/clutter-label.c: + (clutter_label_ensure_layout): Fix the ClutterUnits to Pango + scale conversion. + 2008-01-08 Emmanuele Bassi * clutter/clutter-model.c: diff --git a/clutter/clutter-label.c b/clutter/clutter-label.c index 5c1d83f92..da4bb0fbc 100644 --- a/clutter/clutter-label.c +++ b/clutter/clutter-label.c @@ -198,8 +198,8 @@ clutter_label_ensure_layout (ClutterLabel *label) } if (priv->ellipsize != PANGO_ELLIPSIZE_NONE) - pango_layout_set_width (priv->layout, width > 0 ? CLUTTER_UNITS_TO_PANGO_UNIT (raw_width) - : -1); + pango_layout_set_width (priv->layout, raw_width > 0 ? CLUTTER_UNITS_TO_PANGO_UNIT (raw_width) + : -1); else if (priv->wrap) { pango_layout_set_wrap (priv->layout, priv->wrap_mode); @@ -266,8 +266,8 @@ clutter_label_ensure_layout (ClutterLabel *label) } } else - pango_layout_set_width (priv->layout, width > 0 ? CLUTTER_UNITS_FROM_PANGO_UNIT (raw_width) - : -1); + pango_layout_set_width (priv->layout, raw_width > 0 ? CLUTTER_UNITS_TO_PANGO_UNIT (raw_width) + : -1); } CLUTTER_NOTE (ACTOR, "Label width set to %d pixels", width);