Some adjustment changes for menuitem.

This commit is contained in:
spx 2011-08-29 19:35:18 +00:00
parent d5083961af
commit a1f0c4fd19
2 changed files with 6 additions and 4 deletions

View File

@ -111,7 +111,7 @@ IDR_SKIN_MENU MENU
BEGIN
POPUP "Skin"
BEGIN
MENUITEM "", ID_CONTEXT_SKINMENU_OPENSKINSFOLDER
MENUITEM " ", ID_CONTEXT_SKINMENU_OPENSKINSFOLDER // Avoid to be compiled as a separator
MENUITEM SEPARATOR
POPUP "Variants"
BEGIN

View File

@ -3794,7 +3794,11 @@ void CRainmeter::ShowContextMenu(POINT pos, CMeterWindow* meterWindow)
HMENU themeMenu = GetSubMenu(subMenu, 5);
if (themeMenu)
{
CreateThemeMenu(themeMenu);
if (!m_Themes.empty())
{
DeleteMenu(themeMenu, 0, MF_BYPOSITION);
CreateThemeMenu(themeMenu);
}
}
if (meterWindow)
@ -3924,8 +3928,6 @@ void CRainmeter::CreateThemeMenu(HMENU themeMenu)
{
if (!m_Themes.empty())
{
InsertMenu(themeMenu, 0, MF_BYPOSITION | MF_SEPARATOR, 0, NULL);
for (size_t i = 0, isize = m_Themes.size(); i < isize; ++i)
{
InsertMenu(themeMenu, i, MF_BYPOSITION, ID_THEME_FIRST + i, m_Themes[i].c_str());