From f8671aaedd5668447ab5ec7c4cdb9ddadacfd4a5 Mon Sep 17 00:00:00 2001 From: Zhiyi Zhang Date: Tue, 22 Jun 2021 16:20:51 +0800 Subject: [PATCH] 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 Signed-off-by: Alexandre Julliard --- dlls/comctl32/theme_scrollbar.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dlls/comctl32/theme_scrollbar.c b/dlls/comctl32/theme_scrollbar.c index 304ff5bacbc..7cc59bbd1e5 100644 --- a/dlls/comctl32/theme_scrollbar.c +++ b/dlls/comctl32/theme_scrollbar.c @@ -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; -- 2.11.4.GIT