From d3190fcf63dc1c5861f8fb3f0c87c6e7052d6efb Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Fri, 25 Apr 2008 18:53:24 +0200 Subject: [PATCH] [draw] Tell pango about padding Signed-off-by: Julien Danjou --- common/draw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/draw.c b/common/draw.c index bea96f7b..d39be3c5 100644 --- a/common/draw.c +++ b/common/draw.c @@ -312,7 +312,7 @@ draw_text(DrawCtx *ctx, p_delete(&bg_color); } - pango_layout_set_width(ctx->layout, pango_units_from_double(area.width)); + pango_layout_set_width(ctx->layout, pango_units_from_double(area.width - padding)); pango_layout_set_ellipsize(ctx->layout, PANGO_ELLIPSIZE_END); pango_layout_set_markup(ctx->layout, buf, len); pango_layout_set_font_description(ctx->layout, style.font->desc);