comctl32: Stop flicker when drawing themed and draw the correct image smoothly.
This commit is contained in:
parent
b4c5a62338
commit
b585ca0f64
|
@ -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);
|
||||
r.right = di->rect.left + end;
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
/* 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);
|
||||
r.top = di->rect.bottom - end;
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
/* draw themed horizontal background from 'start' to 'end' */
|
||||
|
|
Loading…
Reference in New Issue