mirror of
https://github.com/awesomeWM/awesome
synced 2024-11-17 07:47:41 +01:00
widgets: handle image size in text data
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
0012b8dfc0
commit
37e8b95ad9
2 changed files with 7 additions and 1 deletions
|
@ -206,7 +206,10 @@ taglist_draw(draw_context_t *ctx, int screen, widget_node_t *w,
|
|||
area = draw_text_extents(ctx->connection, ctx->phys_screen,
|
||||
globalconf.font, text[i], &pdata[i]);
|
||||
|
||||
if (data->show_empty || tag->selected || tag_isoccupied(tag))
|
||||
if(pdata[i].bg_image)
|
||||
area.width = MAX(area.width, pdata[i].bg_resize ? w->area.height : pdata[i].bg_image->width);
|
||||
|
||||
if(data->show_empty || tag->selected || tag_isoccupied(tag))
|
||||
w->area.width += area.width;
|
||||
|
||||
area_array_append(&tda->areas, area);
|
||||
|
|
|
@ -65,6 +65,9 @@ textbox_draw(draw_context_t *ctx, int screen __attribute__ ((unused)),
|
|||
ctx->phys_screen,
|
||||
globalconf.font, d->text, &pdata).width,
|
||||
ctx->width - used);
|
||||
if(pdata.bg_image)
|
||||
w->area.width = MAX(w->area.width, pdata.bg_resize ? w->area.height : pdata.bg_image->width);
|
||||
|
||||
pdata_arg = &pdata;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue