[COMCTL32] toolbar: Draw checked and not hot buttons as checked, not hot. CORE-13592
authorGiannis Adamopoulos <gadamopoulos@reactos.org>
Thu, 4 Jan 2018 12:30:47 +0000 (14:30 +0200)
committerGiannis Adamopoulos <gadamopoulos@reactos.org>
Thu, 4 Jan 2018 12:30:47 +0000 (14:30 +0200)
Should be sent to wine.

dll/win32/comctl32/toolbar.c

index e0a73e7..8f78b2c 100644 (file)
@@ -1130,7 +1130,11 @@ 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)
+#ifdef __REACTOS__
+            stateId = (tbcd.nmcd.uItemState & CDIS_HOT) ? TS_HOTCHECKED : TS_CHECKED;
+#else
             stateId = (tbcd.nmcd.uItemState & CDIS_HOT) ? TS_HOTCHECKED : TS_HOT;
+#endif
         else if ((tbcd.nmcd.uItemState & CDIS_HOT)
             || (drawSepDropDownArrow && btnPtr->bDropDownPressed))
             stateId = TS_HOT;
@@ -1156,7 +1160,11 @@ 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)
+#ifdef __REACTOS__
+                stateId = (tbcd.nmcd.uItemState & CDIS_HOT) ? TS_HOTCHECKED : TS_CHECKED;
+#else
                 stateId = (tbcd.nmcd.uItemState & CDIS_HOT) ? TS_HOTCHECKED : TS_HOT;
+#endif
             else if (tbcd.nmcd.uItemState & CDIS_HOT)
                 stateId = TS_HOT;