From ed231336fb0f794b1b9606210519b877bd79b9c9 Mon Sep 17 00:00:00 2001 From: marco candrian Date: Wed, 2 Apr 2008 03:02:16 +0200 Subject: [PATCH] [widgets/progressbar] try to prevent the bug FS#141 The real cause for it is unknown to me. I personally can't reproduce it. Even when it won't fix, that patch makes still sense so: no drawing of a rectangle what will get 'overdrawn' fully anyway. --- widgets/progressbar.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/widgets/progressbar.c b/widgets/progressbar.c index 30da502a..ef8fe026 100644 --- a/widgets/progressbar.c +++ b/widgets/progressbar.c @@ -194,7 +194,8 @@ progressbar_draw(Widget *widget, DrawCtx *ctx, int offset, rectangle.width = pb_width + d->border_width + 2 * d->border_padding - 1 + 2; rectangle.height = pb_height + d->border_width + 2 * d->border_padding + 1; - draw_rectangle(ctx, rectangle, d->border_width, True, d->bg[i]); + if(d->border_padding) + draw_rectangle(ctx, rectangle, 1, True, d->bg[i]); draw_rectangle(ctx, rectangle, d->border_width, False, d->bordercolor[i]); } @@ -303,7 +304,8 @@ progressbar_draw(Widget *widget, DrawCtx *ctx, int offset, rectangle.width = pb_width + d->border_width + 2 * d->border_padding - 1 + 2; rectangle.height = pb_height + d->border_width + 2 * d->border_padding + 1; - draw_rectangle(ctx, rectangle, d->border_width, True, d->bg[i]); + if(d->border_padding) + draw_rectangle(ctx, rectangle, 1, True, d->bg[i]); draw_rectangle(ctx, rectangle, d->border_width, False, d->bordercolor[i]); } /* new value/progress in px + pattern setup */