diff --git a/dlls/comctl32/progress.c b/dlls/comctl32/progress.c index 56f40bb2fb4..c44b816a2b8 100644 --- a/dlls/comctl32/progress.c +++ b/dlls/comctl32/progress.c @@ -263,38 +263,22 @@ static const ProgressDrawProc drawProcClassic[8] = { static void draw_theme_bar_H (const ProgressDrawInfo* di, int start, int end) { RECT r; - int right = di->rect.left + end; r.left = di->rect.left + start; r.top = di->rect.top; r.bottom = di->rect.bottom; - while (r.left < right) - { - r.right = min (r.left + di->ledW, right); - DrawThemeBackground (di->theme, di->hdc, PP_CHUNK, 0, &r, NULL); - r.left = r.right; - r.right = min (r.left + di->ledGap, right); - DrawThemeBackground (di->theme, di->hdc, PP_BAR, 0, &di->bgRect, &r); - r.left = r.right; - } + r.right = di->rect.left + end; + DrawThemeBackground (di->theme, di->hdc, PP_CHUNK, 0, &r, NULL); } -/* draw themed horizontal bar from 'start' to 'end' */ +/* draw themed vertical bar from 'start' to 'end' */ static void draw_theme_bar_V (const ProgressDrawInfo* di, int start, int end) { RECT r; - int top = di->rect.bottom - end; r.left = di->rect.left; r.right = di->rect.right; r.bottom = di->rect.bottom - start; - while (r.bottom > top) - { - r.top = max (r.bottom - di->ledW, top); - DrawThemeBackground (di->theme, di->hdc, PP_CHUNKVERT, 0, &r, NULL); - r.bottom = r.top; - r.top = max (r.bottom - di->ledGap, top); - DrawThemeBackground (di->theme, di->hdc, PP_BARVERT, 0, &di->bgRect, &r); - r.bottom = r.top; - } + r.top = di->rect.bottom - end; + DrawThemeBackground (di->theme, di->hdc, PP_CHUNKVERT, 0, &r, NULL); } /* draw themed horizontal background from 'start' to 'end' */