Systray: Correctly compute extents (FS#768)
The systray bases its extents on the size of the wibox that it is contained in. No idea how this is supposed to work when the systray doesn't get the full size, but in a vertical wibox, using <height of wibox> * <number of icons in systray> certainly doesn't work for computing the size. The fix isn't hard: Check the wibox' orientation when drawing and base our calculation on its width if its orientation is different from East. Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
e5d4ff6147
commit
92183caad0
|
@ -79,7 +79,11 @@ systray_draw(widget_t *widget, draw_context_t *ctx,
|
|||
}
|
||||
|
||||
systray_data_t *d = widget->data;
|
||||
|
||||
if (p->orientation == East)
|
||||
d->height = p->geometry.height;
|
||||
else
|
||||
d->height = p->geometry.width;
|
||||
|
||||
/* set wibox orientation */
|
||||
/** \todo stop setting that property on each redraw */
|
||||
|
|
Loading…
Reference in New Issue