textbox can be flex-aligned

This commit is contained in:
Julien Danjou 2008-02-28 16:19:38 +01:00
parent 46b80552c6
commit 86927a9e7e

View file

@ -41,6 +41,8 @@ textbox_draw(Widget *widget, DrawCtx *ctx, int offset, int used)
if(d->width)
widget->area.width = d->width;
else if(widget->alignment == AlignFlex)
widget->area.width = widget->statusbar->width - used;
else
widget->area.width = MIN(draw_textwidth(ctx->display, widget->font, d->text),
widget->statusbar->width - used);