draw: height computing honor margin top
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
46b3a14a8f
commit
35811f9c36
2
draw.c
2
draw.c
|
@ -393,7 +393,7 @@ draw_text(draw_context_t *ctx, font_t *font, PangoEllipsizeMode ellip, PangoWrap
|
||||||
pango_units_from_double(area.width
|
pango_units_from_double(area.width
|
||||||
- (pdata->margin.left
|
- (pdata->margin.left
|
||||||
+ pdata->margin.right)));
|
+ 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_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);
|
||||||
|
|
Loading…
Reference in New Issue