From: Jim Evins Date: Sat, 25 Jan 2014 23:14:31 +0000 (-0500) Subject: Fix layout problems with center and right text alignment to text box. X-Git-Tag: glabels-3_4_0~127 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=a65a7dfee1053660679989a9a28ae10d4e589648;p=glabels 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. --- 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);