[draw] Draw style background in draw text if no bg in markup

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2008-04-25 21:16:37 +02:00
parent 3965c1e1f0
commit dd9cb9810b
1 changed files with 2 additions and 0 deletions

View File

@ -311,6 +311,8 @@ draw_text(DrawCtx *ctx,
draw_rectangle(ctx, area, 1.0, true, *bg_color); draw_rectangle(ctx, area, 1.0, true, *bg_color);
p_delete(&bg_color); p_delete(&bg_color);
} }
else
draw_rectangle(ctx, area, 1.0, true, style.bg);
pango_layout_set_width(ctx->layout, pango_units_from_double(area.width - padding)); pango_layout_set_width(ctx->layout, pango_units_from_double(area.width - padding));
pango_layout_set_ellipsize(ctx->layout, PANGO_ELLIPSIZE_END); pango_layout_set_ellipsize(ctx->layout, PANGO_ELLIPSIZE_END);