From a1f0c4fd192b42eb752a3ff95bb2c9afa96fce8f Mon Sep 17 00:00:00 2001 From: spx Date: Mon, 29 Aug 2011 19:35:18 +0000 Subject: [PATCH] Some adjustment changes for menuitem. --- Library/Library.rc | 2 +- Library/Rainmeter.cpp | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Library/Library.rc b/Library/Library.rc index 4957e1ff..3d1c6783 100644 --- a/Library/Library.rc +++ b/Library/Library.rc @@ -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 diff --git a/Library/Rainmeter.cpp b/Library/Rainmeter.cpp index 46e1ad92..f1d7f191 100644 --- a/Library/Rainmeter.cpp +++ b/Library/Rainmeter.cpp @@ -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());