https://git.reactos.org/?p=reactos.git;a=commitdiff;h=5966a18e66c8139db927443b0d73ac711b3e9fd5

commit 5966a18e66c8139db927443b0d73ac711b3e9fd5
Author:     Giannis Adamopoulos <[email protected]>
AuthorDate: Sat Jan 13 16:19:27 2018 +0200
Commit:     Giannis Adamopoulos <[email protected]>
CommitDate: Sat Jan 13 16:19:27 2018 +0200

    [COMCTL32] toolbar: Use the theme text color for the dropdown arrows. 
CORE-13855
---
 dll/win32/comctl32/toolbar.c | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/dll/win32/comctl32/toolbar.c b/dll/win32/comctl32/toolbar.c
index 0fb910017e..98965f42b8 100644
--- a/dll/win32/comctl32/toolbar.c
+++ b/dll/win32/comctl32/toolbar.c
@@ -1195,6 +1195,7 @@ TOOLBAR_DrawButton (const TOOLBAR_INFO *infoPtr, 
TBUTTON_INFO *btnPtr, HDC hdc,
             TOOLBAR_DrawArrow(hdc, rcArrow.left+1, rcArrow.top+1 + 
(rcArrow.bottom - rcArrow.top - ARROW_HEIGHT) / 2, 
comctl32_color.clrBtnHighlight);
             TOOLBAR_DrawArrow(hdc, rcArrow.left, rcArrow.top + (rcArrow.bottom 
- rcArrow.top - ARROW_HEIGHT) / 2, comctl32_color.clr3dShadow);
         }
+#ifndef __REACTOS__
         else if (tbcd.nmcd.uItemState & (CDIS_SELECTED | CDIS_CHECKED))
         {
             offset = (dwItemCDFlag & TBCDRF_NOOFFSET) ? 0 : 1;
@@ -1202,6 +1203,22 @@ TOOLBAR_DrawButton (const TOOLBAR_INFO *infoPtr, 
TBUTTON_INFO *btnPtr, HDC hdc,
         }
         else
             TOOLBAR_DrawArrow(hdc, rcArrow.left, rcArrow.top + (rcArrow.bottom 
- rcArrow.top - ARROW_HEIGHT) / 2, comctl32_color.clrBtnText);
+#else
+        else
+        {
+            COLORREF clr = comctl32_color.clrBtnText;
+            if (theme)
+                GetThemeColor(theme, TP_BUTTON, TS_NORMAL, TMT_TEXTCOLOR, 
&clr);
+
+            if (tbcd.nmcd.uItemState & (CDIS_SELECTED | CDIS_CHECKED))
+            {
+                offset = (dwItemCDFlag & TBCDRF_NOOFFSET) ? 0 : 1;
+                TOOLBAR_DrawArrow(hdc, rcArrow.left + offset, rcArrow.top + 
offset + (rcArrow.bottom - rcArrow.top - ARROW_HEIGHT) / 2, clr);
+            }
+            else
+                TOOLBAR_DrawArrow(hdc, rcArrow.left, rcArrow.top + 
(rcArrow.bottom - rcArrow.top - ARROW_HEIGHT) / 2, clr);
+        }
+#endif
     }
 
     if (dwItemCustDraw & CDRF_NOTIFYPOSTPAINT)

Reply via email to