[SHELL32] -CMenuBand: When the flat menus style is enabled, shell menu bars should...
authorGiannis Adamopoulos <gadamopoulos@reactos.org>
Fri, 16 Jun 2017 17:53:50 +0000 (17:53 +0000)
committerGiannis Adamopoulos <gadamopoulos@reactos.org>
Fri, 16 Jun 2017 17:53:50 +0000 (17:53 +0000)
svn path=/trunk/; revision=75058

reactos/dll/win32/shell32/shellmenu/CMenuToolbars.cpp

index fa30104..9a1a967 100644 (file)
@@ -160,7 +160,10 @@ HRESULT CMenuToolbarBase::OnCustomDraw(LPNMTBCUSTOMDRAW cdraw, LRESULT * theResu
         isHot = m_hotBar == this && (int) cdraw->nmcd.dwItemSpec == m_hotItem;
         isPopup = m_popupBar == this && (int) cdraw->nmcd.dwItemSpec == m_popupItem;
 
         isHot = m_hotBar == this && (int) cdraw->nmcd.dwItemSpec == m_hotItem;
         isPopup = m_popupBar == this && (int) cdraw->nmcd.dwItemSpec == m_popupItem;
 
-        if ((m_initFlags & SMINIT_VERTICAL))
+        if (m_hotItem < 0 && isPopup)
+            isHot = TRUE;
+
+        if ((m_useFlatMenus && isHot) || (m_initFlags & SMINIT_VERTICAL))
         {
             COLORREF clrText;
             HBRUSH   bgBrush;
         {
             COLORREF clrText;
             HBRUSH   bgBrush;
@@ -171,7 +174,7 @@ HRESULT CMenuToolbarBase::OnCustomDraw(LPNMTBCUSTOMDRAW cdraw, LRESULT * theResu
             cdraw->nmcd.uItemState &= ~(CDIS_HOT | CDIS_CHECKED);
 
             // Decide on the colors
             cdraw->nmcd.uItemState &= ~(CDIS_HOT | CDIS_CHECKED);
 
             // Decide on the colors
-            if (isHot || (m_hotItem < 0 && isPopup))
+            if (isHot)
             {
                 cdraw->nmcd.uItemState |= CDIS_HOT;
 
             {
                 cdraw->nmcd.uItemState |= CDIS_HOT;
 
@@ -203,7 +206,7 @@ HRESULT CMenuToolbarBase::OnCustomDraw(LPNMTBCUSTOMDRAW cdraw, LRESULT * theResu
             cdraw->nmcd.uItemState &= ~CDIS_HOT;
 
             // Decide on the colors
             cdraw->nmcd.uItemState &= ~CDIS_HOT;
 
             // Decide on the colors
-            if (isHot || (m_hotItem < 0 && isPopup))
+            if (isHot)
             {
                 cdraw->nmcd.uItemState |= CDIS_HOT;
             }
             {
                 cdraw->nmcd.uItemState |= CDIS_HOT;
             }