From: Zhiyi Zhang zzhang@codeweavers.com
Tests show that DrawThemeParentBackground() is not used to draw the background when the plus/minus signs are transparent.
Fix Becky email client having incorrect background for its folder tree view.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56861 --- dlls/comctl32/tests/misc.c | 3 +-- dlls/comctl32/treeview.c | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/dlls/comctl32/tests/misc.c b/dlls/comctl32/tests/misc.c index ed31dfb8719..bb3f1993a83 100644 --- a/dlls/comctl32/tests/misc.c +++ b/dlls/comctl32/tests/misc.c @@ -890,7 +890,7 @@ static void test_themed_background(void) {TRACKBAR_CLASSA, 0, wm_ctlcolorstatic_seq}, {WC_TREEVIEWA, 0, treeview_seq}, {WC_TREEVIEWA, TVS_HASBUTTONS, treeview_seq}, - {WC_TREEVIEWA, TVS_HASBUTTONS, treeview_seq, TRUE, L"explorer"}, + {WC_TREEVIEWA, TVS_HASBUTTONS, treeview_seq, FALSE, L"explorer"}, {UPDOWN_CLASSA, 0, empty_seq}, {WC_SCROLLBARA, 0, scrollbar_seq}, {WC_SCROLLBARA, SBS_SIZEBOX, empty_seq}, @@ -957,7 +957,6 @@ static void test_themed_background(void) { hdc = GetDC(child); color = GetPixel(hdc, 40, 40); - todo_wine_if(tests[i].window_theme && !lstrcmpW(tests[i].window_theme, L"explorer")) ok(color == 0xffffff, "Expected color %#x, got %#lx.\n", 0xffffff, color); ReleaseDC(child, hdc); } diff --git a/dlls/comctl32/treeview.c b/dlls/comctl32/treeview.c index 036afd15c69..e2a4280f131 100644 --- a/dlls/comctl32/treeview.c +++ b/dlls/comctl32/treeview.c @@ -2918,7 +2918,7 @@ TREEVIEW_Refresh(TREEVIEW_INFO *infoPtr, HDC hdc, const RECT *rc) if (infoPtr->dwStyle & TVS_HASBUTTONS && (theme = GetWindowTheme(infoPtr->hwnd))) { if (IsThemeBackgroundPartiallyTransparent(theme, TVP_GLYPH, 0)) - DrawThemeParentBackground(infoPtr->hwnd, hdc, NULL); + FillRect(hdc, &rect, (HBRUSH)(COLOR_WINDOW + 1)); }
for (item = infoPtr->root->firstChild;