From 9b364d0009f584f1544f034c8b20ecc7c76c3548 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Fri, 1 Aug 2008 17:44:51 +0200 Subject: [PATCH] textbox: fix first drawing Signed-off-by: Julien Danjou --- widgets/textbox.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/widgets/textbox.c b/widgets/textbox.c index 9596a4d2..97328a0d 100644 --- a/widgets/textbox.c +++ b/widgets/textbox.c @@ -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,