mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 21:32:56 +00:00
[RSHELL][COMCTL32] Fix wrong selected item color used by the Start Menu. Brought to you by Stefano Toncich with minor changes by me. CORE-9309
svn path=/trunk/; revision=67380
This commit is contained in:
parent
91017f0f9a
commit
1fae599114
2 changed files with 20 additions and 3 deletions
|
@ -21,6 +21,7 @@
|
||||||
#include <commoncontrols.h>
|
#include <commoncontrols.h>
|
||||||
#include <shlwapi_undoc.h>
|
#include <shlwapi_undoc.h>
|
||||||
#include <uxtheme.h>
|
#include <uxtheme.h>
|
||||||
|
#include <vssym32.h>
|
||||||
|
|
||||||
#include "CMenuBand.h"
|
#include "CMenuBand.h"
|
||||||
#include "CMenuToolbars.h"
|
#include "CMenuToolbars.h"
|
||||||
|
@ -159,7 +160,7 @@ HRESULT CMenuToolbarBase::OnCustomDraw(LPNMTBCUSTOMDRAW cdraw, LRESULT * theResu
|
||||||
isHot = m_hotBar == this && (int) cdraw->nmcd.dwItemSpec == m_hotItem;
|
isHot = m_hotBar == this && (int) cdraw->nmcd.dwItemSpec == m_hotItem;
|
||||||
isPopup = m_popupBar == this && (int) cdraw->nmcd.dwItemSpec == m_popupItem;
|
isPopup = m_popupBar == this && (int) cdraw->nmcd.dwItemSpec == m_popupItem;
|
||||||
|
|
||||||
if (m_initFlags & SMINIT_VERTICAL || IsAppThemed())
|
if ((m_initFlags & SMINIT_VERTICAL))
|
||||||
{
|
{
|
||||||
COLORREF clrText;
|
COLORREF clrText;
|
||||||
HBRUSH bgBrush;
|
HBRUSH bgBrush;
|
||||||
|
@ -295,7 +296,10 @@ HRESULT CMenuToolbarBase::ShowDW(BOOL fShow)
|
||||||
UpdateImageLists();
|
UpdateImageLists();
|
||||||
|
|
||||||
// For custom-drawing
|
// For custom-drawing
|
||||||
SystemParametersInfo(SPI_GETFLATMENU, 0, &m_useFlatMenus, 0);
|
if (IsAppThemed())
|
||||||
|
GetThemeSysBool(GetWindowTheme(m_hWnd), TMT_FLATMENUS);
|
||||||
|
else
|
||||||
|
SystemParametersInfo(SPI_GETFLATMENU, 0, &m_useFlatMenus, 0);
|
||||||
|
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
@ -383,7 +387,11 @@ HRESULT CMenuToolbarBase::CreateToolbar(HWND hwndParent, DWORD dwFlags)
|
||||||
|
|
||||||
SetWindowTheme(m_hWnd, L"", L"");
|
SetWindowTheme(m_hWnd, L"", L"");
|
||||||
|
|
||||||
SystemParametersInfo(SPI_GETFLATMENU, 0, &m_useFlatMenus, 0);
|
if (IsAppThemed())
|
||||||
|
GetThemeSysBool(GetWindowTheme(m_hWnd), TMT_FLATMENUS);
|
||||||
|
else
|
||||||
|
SystemParametersInfo(SPI_GETFLATMENU, 0, &m_useFlatMenus, 0);
|
||||||
|
|
||||||
m_menuBand->AdjustForTheme(m_useFlatMenus);
|
m_menuBand->AdjustForTheme(m_useFlatMenus);
|
||||||
|
|
||||||
// If needed, create the pager.
|
// If needed, create the pager.
|
||||||
|
|
|
@ -1042,7 +1042,11 @@ TOOLBAR_DrawButton (const TOOLBAR_INFO *infoPtr, TBUTTON_INFO *btnPtr, HDC hdc,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef __REACTOS__
|
||||||
|
if (theme && !(dwItemCDFlag & TBCDRF_NOBACKGROUND))
|
||||||
|
#else
|
||||||
if (theme)
|
if (theme)
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
int partId = drawSepDropDownArrow ? TP_SPLITBUTTON : TP_BUTTON;
|
int partId = drawSepDropDownArrow ? TP_SPLITBUTTON : TP_BUTTON;
|
||||||
int stateId = TS_NORMAL;
|
int stateId = TS_NORMAL;
|
||||||
|
@ -1059,7 +1063,12 @@ TOOLBAR_DrawButton (const TOOLBAR_INFO *infoPtr, TBUTTON_INFO *btnPtr, HDC hdc,
|
||||||
|
|
||||||
DrawThemeBackground (theme, hdc, partId, stateId, &rc, NULL);
|
DrawThemeBackground (theme, hdc, partId, stateId, &rc, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef __REACTOS__
|
||||||
|
if (!theme)
|
||||||
|
#else
|
||||||
else
|
else
|
||||||
|
#endif
|
||||||
TOOLBAR_DrawFrame(infoPtr, &tbcd, &rc, dwItemCDFlag);
|
TOOLBAR_DrawFrame(infoPtr, &tbcd, &rc, dwItemCDFlag);
|
||||||
|
|
||||||
if (drawSepDropDownArrow)
|
if (drawSepDropDownArrow)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue