widget: remove useless widget_calculate_offset()

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2009-04-11 11:50:12 +02:00
parent 680e51049e
commit 46ce0c1da1
2 changed files with 0 additions and 20 deletions

View File

@ -49,25 +49,6 @@ widget_delete(widget_t **widget)
p_delete(widget);
}
/** Compute offset for drawing the first pixel of a widget.
* \param barwidth The wibox width.
* \param widgetwidth The widget width.
* \param alignment The widget alignment on wibox.
* \return The x coordinate to draw at.
*/
int
widget_calculate_offset(int barwidth, int widgetwidth, int offset, int alignment)
{
switch(alignment)
{
case AlignLeft:
case AlignFlex:
case AlignFixed:
return offset;
}
return barwidth - offset - widgetwidth;
}
/** Get a widget node from a wibox by coords.
* \param Container position.
* \param widgets The widget list.

View File

@ -36,7 +36,6 @@ void widget_delete(widget_t **);
DO_RCNT(widget_t, widget, widget_delete)
int widget_calculate_offset(int, int, int, int);
widget_t *widget_getbycoords(position_t, widget_node_array_t *, int, int, int16_t *, int16_t *);
void widget_render(wibox_t *);