From 46ce0c1da124d6652161b5a4c43223af9bb8fc88 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Sat, 11 Apr 2009 11:50:12 +0200 Subject: [PATCH] widget: remove useless widget_calculate_offset() Signed-off-by: Julien Danjou --- widget.c | 19 ------------------- widget.h | 1 - 2 files changed, 20 deletions(-) diff --git a/widget.c b/widget.c index de9091643..d6f31185d 100644 --- a/widget.c +++ b/widget.c @@ -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. diff --git a/widget.h b/widget.h index c4198b0d8..758337d28 100644 --- a/widget.h +++ b/widget.h @@ -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 *);