Module: wine Branch: master Commit: b585ca0f64dc4b80f34d47cb514cb50a95202ef3 URL: http://source.winehq.org/git/wine.git/?a=commit;h=b585ca0f64dc4b80f34d47cb51...
Author: André Hentschel nerv@dawncrow.de Date: Sun Jul 26 15:57:06 2009 +0200
comctl32: Stop flicker when drawing themed and draw the correct image smoothly.
---
dlls/comctl32/progress.c | 26 +++++--------------------- 1 files changed, 5 insertions(+), 21 deletions(-)
diff --git a/dlls/comctl32/progress.c b/dlls/comctl32/progress.c index 56f40bb..c44b816 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' */