[PATCH 3/3] comctl32/toolbar: Don't use pattern brushes to draw checked background.

Zhiyi Zhang wine at gitlab.winehq.org
Mon Jun 20 23:12:04 CDT 2022


From: Zhiyi Zhang <zzhang at codeweavers.com>

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53049
Signed-off-by: Zhiyi Zhang <zzhang at codeweavers.com>
---
 dlls/comctl32/tests/toolbar.c | 1 -
 dlls/comctl32/toolbar.c       | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/dlls/comctl32/tests/toolbar.c b/dlls/comctl32/tests/toolbar.c
index 9c1a974ba94..880aa29a595 100644
--- a/dlls/comctl32/tests/toolbar.c
+++ b/dlls/comctl32/tests/toolbar.c
@@ -2666,7 +2666,6 @@ static void test_visual(void)
     toolbar_dc = GetDC(toolbar);
     color = GetPixel(toolbar_dc, 5, 5);
     if (is_theme_active)
-        todo_wine
         ok(color != RGB(0xff, 0, 0), "Unexpected color %#x.\n", color);
     else
         ok(color == RGB(0xff, 0, 0), "Unexpected color %#x.\n", color);
diff --git a/dlls/comctl32/toolbar.c b/dlls/comctl32/toolbar.c
index bea294958c5..f49d630e255 100644
--- a/dlls/comctl32/toolbar.c
+++ b/dlls/comctl32/toolbar.c
@@ -1042,7 +1042,7 @@ TOOLBAR_DrawButton (const TOOLBAR_INFO *infoPtr, TBUTTON_INFO *btnPtr, HDC hdc,
         (btnPtr->fsState & (TBSTATE_PRESSED | TBSTATE_CHECKED)))
         OffsetRect(&rcText, 1, 1);
 
-    if (!(tbcd.nmcd.uItemState & CDIS_HOT) && 
+    if (!theme && !(tbcd.nmcd.uItemState & CDIS_HOT) && 
         ((tbcd.nmcd.uItemState & CDIS_CHECKED) || (tbcd.nmcd.uItemState & CDIS_INDETERMINATE)))
         TOOLBAR_DrawPattern (&rc, &tbcd);
 
-- 
GitLab

https://gitlab.winehq.org/wine/wine/-/merge_requests/288



More information about the wine-devel mailing list