[SHELL32] -CMenuBand: When the flat menus style is enabled, shell menu bars should not look like toolbars.

svn path=/trunk/; revision=75058
This commit is contained in:
Giannis Adamopoulos 2017-06-16 17:53:50 +00:00
parent 8c8f34f7fd
commit 3770c2d134

View 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;
if ((m_initFlags & SMINIT_VERTICAL))
if (m_hotItem < 0 && isPopup)
isHot = TRUE;
if ((m_useFlatMenus && isHot) || (m_initFlags & SMINIT_VERTICAL))
{
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
if (isHot || (m_hotItem < 0 && isPopup))
if (isHot)
{
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
if (isHot || (m_hotItem < 0 && isPopup))
if (isHot)
{
cdraw->nmcd.uItemState |= CDIS_HOT;
}