diff --git a/common/draw.c b/common/draw.c index 04f1ce32..c53f89c6 100644 --- a/common/draw.c +++ b/common/draw.c @@ -228,6 +228,8 @@ draw_markup_on_element(markup_parser_data_t *p, const char *elem, break; case A_TK_ALIGN: data->bg_align = draw_align_fromstr(*values, -1); + case A_TK_RESIZE: + data->bg_resize = a_strtobool(*values, -1); default: break; } @@ -353,7 +355,7 @@ draw_text(draw_context_t *ctx, font_t *font, default: break; } - draw_image(ctx, x, y, 0, pdata->bg_image); + draw_image(ctx, x, y, area.height, pdata->bg_image); draw_image_delete(&pdata->bg_image); } diff --git a/common/draw.h b/common/draw.h index 41ed673e..b5933f51 100644 --- a/common/draw.h +++ b/common/draw.h @@ -168,6 +168,7 @@ typedef struct xcolor_t bg_color; draw_image_t *bg_image; alignment_t bg_align; + bool bg_resize; struct { int offset;