From 486e13eba0a732d7ad01b1b386b6d558067e1892 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Wed, 3 Dec 2008 11:17:00 +0100 Subject: [PATCH] draw: honor bottom margin Signed-off-by: Julien Danjou --- draw.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/draw.c b/draw.c index 3b97d5d2d..7e4b1ed94 100644 --- a/draw.c +++ b/draw.c @@ -356,7 +356,8 @@ draw_text(draw_context_t *ctx, font_t *font, PangoEllipsizeMode ellip, PangoWrap pango_units_from_double(area.width - (margin->left + margin->right))); - pango_layout_set_height(ctx->layout, pango_units_from_double(area.height) - margin->top); + pango_layout_set_height(ctx->layout, pango_units_from_double(area.height) + - (margin->top + margin->bottom)); pango_layout_set_ellipsize(ctx->layout, ellip); pango_layout_set_wrap(ctx->layout, wrap); pango_layout_set_attributes(ctx->layout, pdata->attr_list);