store widget height

This commit is contained in:
Julien Danjou 2008-01-05 12:44:14 +01:00
parent 609318cbec
commit b1c62a618f
8 changed files with 13 additions and 1 deletions

View file

@ -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;
}

View file

@ -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,

View file

@ -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,

View file

@ -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))
{

View file

@ -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;
}

View file

@ -111,6 +111,7 @@ taglist_draw(Widget *widget,
widget->area.width += w;
}
widget->area.height = widget->statusbar->height;
return widget->area.width;
}

View file

@ -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;
}

View file

@ -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,