draw: honor bottom margin

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2008-12-03 11:17:00 +01:00
parent 8e9f0c8857
commit 486e13eba0
1 changed files with 2 additions and 1 deletions

3
draw.c
View File

@ -356,7 +356,8 @@ draw_text(draw_context_t *ctx, font_t *font, PangoEllipsizeMode ellip, PangoWrap
pango_units_from_double(area.width pango_units_from_double(area.width
- (margin->left - (margin->left
+ margin->right))); + 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_ellipsize(ctx->layout, ellip);
pango_layout_set_wrap(ctx->layout, wrap); pango_layout_set_wrap(ctx->layout, wrap);
pango_layout_set_attributes(ctx->layout, pdata->attr_list); pango_layout_set_attributes(ctx->layout, pdata->attr_list);