mirror of
https://github.com/awesomeWM/awesome
synced 2024-11-17 07:47:41 +01:00
textbox width is limited to unused space
This commit is contained in:
parent
fa0ac03f5b
commit
f3aa1ede5c
1 changed files with 3 additions and 3 deletions
|
@ -36,15 +36,15 @@ typedef struct
|
|||
} Data;
|
||||
|
||||
static int
|
||||
textbox_draw(Widget *widget, DrawCtx *ctx, int offset,
|
||||
int used __attribute__ ((unused)))
|
||||
textbox_draw(Widget *widget, DrawCtx *ctx, int offset, int used)
|
||||
{
|
||||
Data *d = widget->data;
|
||||
|
||||
if(d->width)
|
||||
widget->area.width = d->width;
|
||||
else
|
||||
widget->area.width = draw_textwidth(widget->font, d->text);
|
||||
widget->area.width = MIN(draw_textwidth(widget->font, d->text),
|
||||
widget->statusbar->width - used);
|
||||
|
||||
widget->area.height = widget->statusbar->height;
|
||||
|
||||
|
|
Loading…
Reference in a new issue