textbox can be flex-aligned

This commit is contained in:
Julien Danjou 2008-02-28 16:19:38 +01:00
parent 46b80552c6
commit 86927a9e7e
1 changed files with 2 additions and 0 deletions

View File

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