Commit b585ca0f authored by André Hentschel's avatar André Hentschel Committed by Alexandre Julliard

comctl32: Stop flicker when drawing themed and draw the correct image smoothly.

parent b4c5a623
......@@ -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' */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment