Zhiyi Zhang : comctl32/treeview: 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: 02bfec6419dec45b018100526f327007d51168e7
URL: https://source.winehq.org/git/wine.git/?a=commit;h=02bfec6419dec45b018100526f327007d51168e7
Author: Zhiyi Zhang <zzhang at codeweavers.com>
Date: Tue Jun 22 16:20:56 2021 +0800
comctl32/treeview: Draw parent background before drawing control parts.
Fix residual glyphs on background when drawing treeview buttons with themes that contains
transparent button glyphs.
Signed-off-by: Zhiyi Zhang <zzhang at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/comctl32/treeview.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/dlls/comctl32/treeview.c b/dlls/comctl32/treeview.c
index 98cf5489f2b..f4a387dd0d2 100644
--- a/dlls/comctl32/treeview.c
+++ b/dlls/comctl32/treeview.c
@@ -2901,6 +2901,7 @@ TREEVIEW_Refresh(TREEVIEW_INFO *infoPtr, HDC hdc, const RECT *rc)
HWND hwnd = infoPtr->hwnd;
RECT rect = *rc;
TREEVIEW_ITEM *item;
+ HTHEME theme;
if (infoPtr->clientHeight == 0 || infoPtr->clientWidth == 0)
{
@@ -2917,6 +2918,12 @@ TREEVIEW_Refresh(TREEVIEW_INFO *infoPtr, HDC hdc, const RECT *rc)
return;
}
+ if (infoPtr->dwStyle & TVS_HASBUTTONS && (theme = GetWindowTheme(infoPtr->hwnd)))
+ {
+ if (IsThemeBackgroundPartiallyTransparent(theme, TVP_GLYPH, 0))
+ DrawThemeParentBackground(infoPtr->hwnd, hdc, NULL);
+ }
+
for (item = infoPtr->root->firstChild;
item != NULL;
item = TREEVIEW_GetNextListItem(infoPtr, item))
More information about the wine-cvs
mailing list