textbox: fix first drawing
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
7c5ab691c8
commit
9b364d0009
|
@ -55,6 +55,8 @@ textbox_draw(draw_context_t *ctx, int screen __attribute__ ((unused)),
|
||||||
textbox_data_t *d = w->widget->data;
|
textbox_data_t *d = w->widget->data;
|
||||||
draw_parser_data_t pdata, *pdata_arg = NULL;
|
draw_parser_data_t pdata, *pdata_arg = NULL;
|
||||||
|
|
||||||
|
w->area.height = ctx->height;
|
||||||
|
|
||||||
if(d->width)
|
if(d->width)
|
||||||
w->area.width = d->width;
|
w->area.width = d->width;
|
||||||
else if(w->widget->align == AlignFlex)
|
else if(w->widget->align == AlignFlex)
|
||||||
|
@ -74,8 +76,6 @@ textbox_draw(draw_context_t *ctx, int screen __attribute__ ((unused)),
|
||||||
pdata.bg_resize ? ((double) pdata.bg_image->width / (double) pdata.bg_image->height) * w->area.height : pdata.bg_image->width);
|
pdata.bg_resize ? ((double) pdata.bg_image->width / (double) pdata.bg_image->height) * w->area.height : pdata.bg_image->width);
|
||||||
}
|
}
|
||||||
|
|
||||||
w->area.height = ctx->height;
|
|
||||||
|
|
||||||
w->area.x = widget_calculate_offset(ctx->width,
|
w->area.x = widget_calculate_offset(ctx->width,
|
||||||
w->area.width,
|
w->area.width,
|
||||||
offset,
|
offset,
|
||||||
|
|
Loading…
Reference in New Issue