Zhiyi Zhang : comctl32/theme_scrollbar: Draw parent background before drawing control parts.
Module: wine Branch: master Commit: f8671aaedd5668447ab5ec7c4cdb9ddadacfd4a5 URL: https://source.winehq.org/git/wine.git/?a=commit;h=f8671aaedd5668447ab5ec7c4... Author: Zhiyi Zhang <zzhang(a)codeweavers.com> Date: Tue Jun 22 16:20:51 2021 +0800 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(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- 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;
participants (1)
-
Alexandre Julliard