Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Src/StartMenu/StartMenuDLL/CustomMenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ static StdMenuItem g_StdMenu[]=
{L"switch_user",MENU_SWITCHUSER},
{L"lock",MENU_LOCK},
{L"*recent_programs",MENU_RECENT_PROGRAMS},
{L"*heading",MENU_SEPARATOR}, // a separator that shows its label as a heading
{L"search_box",MENU_SEARCH_BOX},
{L"*apps",MENU_APPS},

Expand Down
8 changes: 4 additions & 4 deletions Src/StartMenu/StartMenuDLL/MenuContainer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1121,9 +1121,9 @@ void CMenuContainer::AddStandardItems( void )
if (!bFound && !bEmpty) continue;
}

if (pStdItem->id==MENU_SEPARATOR && menuIdx>0 && m_Items[menuIdx-1].id==MENU_SEPARATOR)
if (pStdItem->id==MENU_SEPARATOR && !pStdItem->label && menuIdx>0 && m_Items[menuIdx-1].id==MENU_SEPARATOR)
{
// prevent double separators unless that's exactly what is requested
// prevent double separators unless that's exactly what is requested. a heading (a separator with a label) always stays
if (pStdItem>m_pStdItem && pStdItem[-1].id!=MENU_SEPARATOR)
continue;
}
Expand Down Expand Up @@ -2610,8 +2610,8 @@ void CMenuContainer::InitItems( void )
}
AddStandardItems();

// remove trailing separators
while (!m_Items.empty() && m_Items[m_Items.size()-1].id==MENU_SEPARATOR && !m_Items[m_Items.size()-1].bInline)
// remove trailing separators, but not headings: a heading over an empty list still starts its column
while (!m_Items.empty() && m_Items[m_Items.size()-1].id==MENU_SEPARATOR && !m_Items[m_Items.size()-1].bInline && m_Items[m_Items.size()-1].name.IsEmpty())
m_Items.pop_back();

if (m_Items.empty())
Expand Down
1 change: 1 addition & 0 deletions Src/StartMenu/StartMenuDLL/SettingsUI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1061,6 +1061,7 @@ static const CStdCommand g_StdCommands[]={
{L"switch_user",IDS_SHUTDOWN_SWITCH,IDS_SWITCH_TIP,L"SwitchUserItem",L"$Menu.SwitchUser",L"$Menu.SwitchUserTip",L"none"},
{L"lock",IDS_SHUTDOWN_LOCK,IDS_LOCK_TIP,L"LockItem",L"$Menu.Lock",L"$Menu.LockTip",L"none"},
{L"recent_programs",IDS_SHOW_RECENT,IDS_RECENT_TIP,L"RecentPrograms",NULL,NULL,L"none"},
{L"heading",IDS_HEADING_ITEM,IDS_HEADING_TIP,L"HeadingItem",NULL,NULL,L"none"},
{L"monitor_off",IDS_MONITOR_OFF_ITEM,IDS_MONITOR_OFF_TIP,L"MonitorOffItem",L"$Menu.MonitorOff",NULL,L"none"},
{L"",IDS_CUSTOM_ITEM,IDS_CUSTOM_TIP,L"CustomItem",NULL,NULL,L""},
{NULL},
Expand Down
3 changes: 3 additions & 0 deletions Src/StartMenu/StartMenuDLL/SkinManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2196,6 +2196,9 @@ bool MenuSkin::LoadSkin( HMODULE hMod, const wchar_t *variation, const wchar_t *
return false;
if (!LoadSkinItem(hMod,parser,L"Main2_new",ItemSettings[COLUMN2_NEW],&ItemSettings[COLUMN2_ITEM],Main_background,bRTL))
return false;
// like the first column: the text of named separators (headings) needs a font and colors
if (!LoadSkinItem(hMod,parser,L"Main2_separator",ItemSettings[COLUMN2_SEPARATOR],&ItemSettings[COLUMN2_ITEM],Main_background,bRTL))
return false;
ItemSettings[COLUMN2_SEPARATOR].sepHeight=ScaleSkinElement(DEFAULT_SEPARATOR_HEIGHT);
str=parser.FindSetting(L"Main2_separator");
if (str)
Expand Down
2 changes: 2 additions & 0 deletions Src/StartMenu/StartMenuDLL/StartMenuDLL.rc
Original file line number Diff line number Diff line change
Expand Up @@ -1075,6 +1075,8 @@ BEGIN
IDS_MAIN_MENU_SETTINGS "Main Menu"
IDS_BUTTON_OFFSET "Button offset"
IDS_BUTTON_OFFSET_TIP "Offset the start button horizontally by the amount of pixels specified"
IDS_HEADING_ITEM "Heading"
IDS_HEADING_TIP "A separator that shows its label as a heading over the items that follow it"
END

STRINGTABLE
Expand Down
2 changes: 2 additions & 0 deletions Src/StartMenu/StartMenuDLL/resource.h
Original file line number Diff line number Diff line change
Expand Up @@ -788,6 +788,8 @@
#define IDS_ALT_ACCELERATORS_TIP 3689
#define IDS_BUTTON_OFFSET 3690
#define IDS_BUTTON_OFFSET_TIP 3691
#define IDS_HEADING_ITEM 3704
#define IDS_HEADING_TIP 3705
#define IDS_STRING7001 7001
#define IDS_STRING7002 7002
#define IDS_STRING7003 7003
Expand Down