mirror of
https://github.com/awesomeWM/awesome
synced 2024-11-17 07:47:41 +01:00
store widget height
This commit is contained in:
parent
609318cbec
commit
b1c62a618f
8 changed files with 13 additions and 1 deletions
|
@ -71,6 +71,7 @@ focustitle_draw(Widget *widget, DrawCtx *ctx, int offset, int used)
|
|||
widget->statusbar->width - used, widget->statusbar->height, True, d->bg);
|
||||
|
||||
widget->area.width = widget->statusbar->width - used;
|
||||
widget->area.height = widget->statusbar->height;
|
||||
|
||||
return widget->area.width;
|
||||
}
|
||||
|
|
|
@ -42,6 +42,8 @@ iconbox_draw(Widget *widget, DrawCtx *ctx, int offset,
|
|||
else
|
||||
widget->area.width = area.width;
|
||||
|
||||
widget->area.height = widget->statusbar->height;
|
||||
|
||||
if(!widget->user_supplied_x)
|
||||
widget->area.x = widget_calculate_offset(widget->statusbar->width,
|
||||
widget->area.width,
|
||||
|
|
|
@ -34,6 +34,7 @@ layoutinfo_draw(Widget *widget,
|
|||
int used __attribute__ ((unused)))
|
||||
{
|
||||
Tag **curtags = get_current_tags(widget->statusbar->screen);
|
||||
Area area = draw_get_image_size(curtags[0]->layout->image);
|
||||
|
||||
if(!widget->user_supplied_x)
|
||||
widget->area.x = widget_calculate_offset(widget->statusbar->width,
|
||||
|
@ -44,7 +45,8 @@ layoutinfo_draw(Widget *widget,
|
|||
if(!widget->user_supplied_y)
|
||||
widget->area.y = 0;
|
||||
|
||||
widget->area.width = widget->statusbar->height;
|
||||
widget->area.width = ((double) widget->statusbar->height / (double) area.height) * area.width;;
|
||||
widget->area.height = widget->statusbar->height;
|
||||
|
||||
draw_image(ctx, widget->area.x, widget->area.y,
|
||||
widget->statusbar->height,
|
||||
|
|
|
@ -45,6 +45,8 @@ netwmicon_draw(Widget *widget, DrawCtx *ctx, int offset,
|
|||
return 0;
|
||||
}
|
||||
|
||||
widget->area.height = widget->statusbar->height;
|
||||
|
||||
for(r = globalconf.rules; r; r = r->next)
|
||||
if(r->icon && client_match_rule(sel, r))
|
||||
{
|
||||
|
|
|
@ -101,6 +101,7 @@ progressbar_draw(Widget *widget, DrawCtx *ctx, int offset,
|
|||
}
|
||||
|
||||
widget->area.width = d->width;
|
||||
widget->area.height = widget->statusbar->height;
|
||||
return widget->area.width;
|
||||
}
|
||||
|
||||
|
|
|
@ -111,6 +111,7 @@ taglist_draw(Widget *widget,
|
|||
widget->area.width += w;
|
||||
}
|
||||
|
||||
widget->area.height = widget->statusbar->height;
|
||||
return widget->area.width;
|
||||
}
|
||||
|
||||
|
|
|
@ -136,6 +136,7 @@ tasklist_draw(Widget *widget, DrawCtx *ctx, int offset, int used)
|
|||
}
|
||||
|
||||
widget->area.width = widget->statusbar->width - used;
|
||||
widget->area.height = widget->statusbar->height;
|
||||
|
||||
return widget->area.width;
|
||||
}
|
||||
|
|
|
@ -46,6 +46,8 @@ textbox_draw(Widget *widget, DrawCtx *ctx, int offset,
|
|||
else
|
||||
widget->area.width = textwidth(widget->font, d->text);
|
||||
|
||||
widget->area.height = widget->statusbar->height;
|
||||
|
||||
if(!widget->user_supplied_x)
|
||||
widget->area.x = widget_calculate_offset(widget->statusbar->width,
|
||||
widget->area.width,
|
||||
|
|
Loading…
Reference in a new issue