[progressbar] fix vertical-reversed bar + cosmetic

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
marco candrian 2008-04-17 07:22:47 +02:00 committed by Julien Danjou
parent 3f1c8a9479
commit 66d24bb191
1 changed files with 6 additions and 6 deletions

View File

@ -207,8 +207,8 @@ progressbar_draw(Widget *widget, DrawCtx *ctx, int offset,
}
else
{
/* top to bottom */
pb_progress = pb_width - pb_progress;
/* invert: top with bottom part */
pb_progress = pb_height - pb_progress;
pattern_rect.x = pb_x;
pattern_rect.y = pb_y;
pattern_rect.width = 0;
@ -242,7 +242,7 @@ progressbar_draw(Widget *widget, DrawCtx *ctx, int offset,
/* bg color */
if(!d->reverse[i])
draw_rectangle(ctx, rectangle, 1.0, True, d->fg_off[i]);
else /* REV: bg */
else /* REV: fg */
draw_rectangle_gradient(ctx, rectangle, 1.0, True, pattern_rect,
&(d->fg[i]), d->pfg_center[i], d->pfg_end[i]);
}