Zhiyi Zhang : comctl32/toolbar: Don't use pattern brushes to draw checked background.

Alexandre Julliard julliard at winehq.org
Tue Jun 21 15:45:24 CDT 2022


Module: wine
Branch: master
Commit: 9b5df952a3df292f09ae62bb206bef3ea75fdd82
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=9b5df952a3df292f09ae62bb206bef3ea75fdd82

Author: Zhiyi Zhang <zzhang at codeweavers.com>
Date:   Mon May 30 15:10:31 2022 +0800

comctl32/toolbar: Don't use pattern brushes to draw checked background.

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 897405098c2..f66094a0b3a 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 %#lx.\n", color);
     else
         ok(color == RGB(0xff, 0, 0), "Unexpected color %#lx.\n", color);
diff --git a/dlls/comctl32/toolbar.c b/dlls/comctl32/toolbar.c
index bea294958c5..02538eeb649 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);
 




More information about the wine-cvs mailing list