comctl32/theme_scrollbar: Draw parent background before drawing control parts.

Control parts may be transparent, thus they need to be drawn on top of parent window background.
Otherwise, black artifacts may occur.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zhiyi Zhang 2021-06-22 16:20:51 +08:00 committed by Alexandre Julliard
parent bf6ed90cd6
commit f8671aaedd

View file

@ -332,6 +332,8 @@ static void paint_scrollbar(HWND hwnd, HTHEME theme)
else
state = SZB_RIGHTALIGN;
if (IsThemeBackgroundPartiallyTransparent(theme, SBP_SIZEBOX, state))
DrawThemeParentBackground(hwnd, dc, NULL);
DrawThemeBackground(theme, dc, SBP_SIZEBOX, state, &r, NULL);
} else {
SCROLLINFO si;
@ -365,6 +367,8 @@ static void paint_scrollbar(HWND hwnd, HTHEME theme)
}
}
DrawThemeParentBackground(hwnd, dc, NULL);
if (vertical) {
SIZE upsize, downsize;
int uparrowstate, downarrowstate;