textbox: fix first drawing

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2008-08-01 17:44:51 +02:00
parent 7c5ab691c8
commit 9b364d0009
1 changed files with 2 additions and 2 deletions

View File

@ -55,6 +55,8 @@ textbox_draw(draw_context_t *ctx, int screen __attribute__ ((unused)),
textbox_data_t *d = w->widget->data;
draw_parser_data_t pdata, *pdata_arg = NULL;
w->area.height = ctx->height;
if(d->width)
w->area.width = d->width;
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);
}
w->area.height = ctx->height;
w->area.x = widget_calculate_offset(ctx->width,
w->area.width,
offset,