Zhiyi Zhang : comctl32/theme_scrollbar: Draw parent background before drawing control parts.
Alexandre Julliard
julliard at winehq.org
Tue Jun 22 16:17:06 CDT 2021
Module: wine
Branch: master
Commit: f8671aaedd5668447ab5ec7c4cdb9ddadacfd4a5
URL: https://source.winehq.org/git/wine.git/?a=commit;h=f8671aaedd5668447ab5ec7c4cdb9ddadacfd4a5
Author: Zhiyi Zhang <zzhang at 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 at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at 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;
More information about the wine-cvs
mailing list