Module: wine Branch: master Commit: 50c2144999a70ecbfaeeff39ffd2cab97050029d URL: http://source.winehq.org/git/wine.git/?a=commit;h=50c2144999a70ecbfaeeff39ff...
Author: Mark Harmstone hellas@burntcomma.com Date: Sun Feb 15 20:07:06 2015 +0000
comctl32: Fix graphical error on themed progress bars.
---
dlls/comctl32/progress.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-)
diff --git a/dlls/comctl32/progress.c b/dlls/comctl32/progress.c index 44fdd3f..1b8fcf7 100644 --- a/dlls/comctl32/progress.c +++ b/dlls/comctl32/progress.c @@ -280,23 +280,33 @@ static void draw_theme_bar_V (const ProgressDrawInfo* di, int start, int end) /* draw themed horizontal background from 'start' to 'end' */ static void draw_theme_bkg_H (const ProgressDrawInfo* di, int start, int end) { - RECT r; + RECT bgrect, r; + r.left = di->rect.left + start; r.top = di->rect.top; r.right = di->rect.left + end; r.bottom = di->rect.bottom; - DrawThemeBackground (di->theme, di->hdc, PP_BAR, 0, &di->bgRect, &r); + + bgrect = di->bgRect; + OffsetRect(&bgrect, -bgrect.left, -bgrect.top); + + DrawThemeBackground (di->theme, di->hdc, PP_BAR, 0, &bgrect, &r); }
/* draw themed vertical background from 'start' to 'end' */ static void draw_theme_bkg_V (const ProgressDrawInfo* di, int start, int end) { - RECT r; + RECT bgrect, r; + r.left = di->rect.left; r.top = di->rect.bottom - end; r.right = di->rect.right; r.bottom = di->rect.bottom - start; - DrawThemeBackground (di->theme, di->hdc, PP_BARVERT, 0, &di->bgRect, &r); + + bgrect = di->bgRect; + OffsetRect(&bgrect, -bgrect.left, -bgrect.top); + + DrawThemeBackground (di->theme, di->hdc, PP_BARVERT, 0, &bgrect, &r); }
/* drawing functions for themed style */