[PATCH 1/6] comctl32/theme_scrollbar: Draw parent background before drawing control parts.

Zhiyi Zhang zzhang at codeweavers.com
Tue Jun 22 03:20:51 CDT 2021


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>
---
 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.30.2




More information about the wine-devel mailing list