widget: remove useless widget_calculate_offset()
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
680e51049e
commit
46ce0c1da1
19
widget.c
19
widget.c
|
@ -49,25 +49,6 @@ widget_delete(widget_t **widget)
|
||||||
p_delete(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.
|
/** Get a widget node from a wibox by coords.
|
||||||
* \param Container position.
|
* \param Container position.
|
||||||
* \param widgets The widget list.
|
* \param widgets The widget list.
|
||||||
|
|
1
widget.h
1
widget.h
|
@ -36,7 +36,6 @@ void widget_delete(widget_t **);
|
||||||
|
|
||||||
DO_RCNT(widget_t, widget, widget_delete)
|
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 *);
|
widget_t *widget_getbycoords(position_t, widget_node_array_t *, int, int, int16_t *, int16_t *);
|
||||||
void widget_render(wibox_t *);
|
void widget_render(wibox_t *);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue