textbox can be flex-aligned
This commit is contained in:
parent
46b80552c6
commit
86927a9e7e
|
@ -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);
|
||||||
|
|
Loading…
Reference in New Issue