Zhiyi Zhang : comctl32/toolbar: Use correct state id for checked items.
Alexandre Julliard
julliard at winehq.org
Thu Mar 4 15:53:39 CST 2021
Module: wine
Branch: master
Commit: bde397d220861bf6d844121cc55b5b796d42e5c2
URL: https://source.winehq.org/git/wine.git/?a=commit;h=bde397d220861bf6d844121cc55b5b796d42e5c2
Author: Zhiyi Zhang <zzhang at codeweavers.com>
Date: Thu Mar 4 16:47:44 2021 +0800
comctl32/toolbar: Use correct state id for checked items.
Signed-off-by: Zhiyi Zhang <zzhang at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/comctl32/toolbar.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/comctl32/toolbar.c b/dlls/comctl32/toolbar.c
index 248541aab2e..667a2f4c277 100644
--- a/dlls/comctl32/toolbar.c
+++ b/dlls/comctl32/toolbar.c
@@ -1078,7 +1078,7 @@ TOOLBAR_DrawButton (const TOOLBAR_INFO *infoPtr, TBUTTON_INFO *btnPtr, HDC hdc,
else if (tbcd.nmcd.uItemState & CDIS_SELECTED)
stateId = TS_PRESSED;
else if (tbcd.nmcd.uItemState & CDIS_CHECKED)
- stateId = (tbcd.nmcd.uItemState & CDIS_HOT) ? TS_HOTCHECKED : TS_HOT;
+ stateId = (tbcd.nmcd.uItemState & CDIS_HOT) ? TS_HOTCHECKED : TS_CHECKED;
else if ((tbcd.nmcd.uItemState & CDIS_HOT)
|| (drawSepDropDownArrow && btnPtr->bDropDownPressed))
stateId = TS_HOT;
@@ -1099,7 +1099,7 @@ TOOLBAR_DrawButton (const TOOLBAR_INFO *infoPtr, TBUTTON_INFO *btnPtr, HDC hdc,
else if (btnPtr->bDropDownPressed || (tbcd.nmcd.uItemState & CDIS_SELECTED))
stateId = TS_PRESSED;
else if (tbcd.nmcd.uItemState & CDIS_CHECKED)
- stateId = (tbcd.nmcd.uItemState & CDIS_HOT) ? TS_HOTCHECKED : TS_HOT;
+ stateId = (tbcd.nmcd.uItemState & CDIS_HOT) ? TS_HOTCHECKED : TS_CHECKED;
else if (tbcd.nmcd.uItemState & CDIS_HOT)
stateId = TS_HOT;
More information about the wine-cvs
mailing list