From a65a7dfee1053660679989a9a28ae10d4e589648 Mon Sep 17 00:00:00 2001 From: Jim Evins Date: Sat, 25 Jan 2014 18:14:31 -0500 Subject: [PATCH] Fix layout problems with center and right text alignment to text box. Pango layout width should be 6 pts smaller than text object width to account for a 3 pt margin around layout. --- src/label-text.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/label-text.c b/src/label-text.c index f2216edc..13e9f943 100644 --- a/src/label-text.c +++ b/src/label-text.c @@ -1185,7 +1185,7 @@ layout_text (glLabelText *this, } else { - pango_layout_set_width (layout, object_w * PANGO_SCALE / scale_x); + pango_layout_set_width (layout, (object_w - 2*GL_LABEL_TEXT_MARGIN) * PANGO_SCALE / scale_x); } pango_layout_set_wrap (layout, PANGO_WRAP_WORD); pango_layout_set_alignment (layout, this->priv->align); -- 2.39.5