From 1b48efe738502e0f5f54e500444860c2ad567d7e Mon Sep 17 00:00:00 2001 From: o9000 Date: Thu, 28 Dec 2017 09:11:43 +0100 Subject: [PATCH] Executor: add a bit of slack in the pango text layout, to avoid wrapping due to rounding errors --- src/execplugin/execplugin.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/execplugin/execplugin.c b/src/execplugin/execplugin.c index 6e1f9b9..849203e 100644 --- a/src/execplugin/execplugin.c +++ b/src/execplugin/execplugin.c @@ -486,7 +486,7 @@ void draw_execp(void *obj, cairo_t *c) // draw layout pango_layout_set_font_description(layout, execp->backend->font_desc); - pango_layout_set_width(layout, execp->frontend->textw * PANGO_SCALE); + pango_layout_set_width(layout, (execp->frontend->textw + 1) * PANGO_SCALE); pango_layout_set_alignment(layout, execp->backend->centered ? PANGO_ALIGN_CENTER : PANGO_ALIGN_LEFT); pango_layout_set_wrap(layout, PANGO_WRAP_WORD_CHAR); pango_layout_set_ellipsize(layout, PANGO_ELLIPSIZE_NONE);