[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.
This commit is contained in:
marco candrian 2008-04-02 03:02:16 +02:00 committed by Julien Danjou
parent 30de23d8c7
commit ed231336fb
1 changed files with 4 additions and 2 deletions

View File

@ -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.width = pb_width + d->border_width + 2 * d->border_padding - 1 + 2;
rectangle.height = pb_height + d->border_width + 2 * d->border_padding + 1; 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]); 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.width = pb_width + d->border_width + 2 * d->border_padding - 1 + 2;
rectangle.height = pb_height + d->border_width + 2 * d->border_padding + 1; 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]); draw_rectangle(ctx, rectangle, d->border_width, False, d->bordercolor[i]);
} }
/* new value/progress in px + pattern setup */ /* new value/progress in px + pattern setup */