From 35811f9c3633796a887b7f393c152022594c8d1b Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Tue, 2 Dec 2008 17:53:50 +0100 Subject: [PATCH] draw: height computing honor margin top Signed-off-by: Julien Danjou --- draw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/draw.c b/draw.c index 82400bbc..3a33904c 100644 --- a/draw.c +++ b/draw.c @@ -393,7 +393,7 @@ draw_text(draw_context_t *ctx, font_t *font, PangoEllipsizeMode ellip, PangoWrap pango_units_from_double(area.width - (pdata->margin.left + pdata->margin.right))); - pango_layout_set_height(ctx->layout, pango_units_from_double(area.height)); + pango_layout_set_height(ctx->layout, pango_units_from_double(area.height) - pdata->margin.top); pango_layout_set_ellipsize(ctx->layout, ellip); pango_layout_set_wrap(ctx->layout, wrap); pango_layout_set_attributes(ctx->layout, pdata->attr_list);