Skip to content

Restore Main_no_icons2 behavior for inline subitems #1172

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Oct 15, 2022
Merged
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
11 changes: 7 additions & 4 deletions Src/StartMenu/StartMenuDLL/MenuContainer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1071,7 +1071,7 @@ void CMenuContainer::AddStandardItems( void )
const StdMenuItem *pInlineParent=NULL;
int searchProviderIndex=-1;
m_SearchProvidersCount=0;
MenuSkin::TIconSize mainIconSize=s_Skin.Main_icon_size;
bool bSecondColumn=false;
for (const StdMenuItem *pStdItem=m_pStdItem;;pStdItem++)
{
if (pStdItem->id==MENU_LAST)
Expand All @@ -1089,9 +1089,8 @@ void CMenuContainer::AddStandardItems( void )
if (m_bSubMenu && pStdItem->id==s_ShutdownCommand)
continue;

const bool bTwoColumns = (!m_bSubMenu && s_Skin.TwoColumns);
if (pStdItem->id==MENU_COLUMN_BREAK && bTwoColumns)
mainIconSize=s_Skin.Main2_icon_size;
if (pStdItem->id==MENU_COLUMN_BREAK && !m_bSubMenu && s_Skin.TwoColumns)
bSecondColumn=true;

int stdOptions=GetStdOptions(pStdItem->id);
if (!(stdOptions&MENU_ENABLED)) continue;
Expand Down Expand Up @@ -1272,6 +1271,10 @@ void CMenuContainer::AddStandardItems( void )
item.bSplit=item.bFolder && (item.pStdItem->settings&StdMenuItem::MENU_SPLIT_BUTTON)!=0;

// get icon
MenuSkin::TIconSize mainIconSize=!bSecondColumn ? s_Skin.Main_icon_size : s_Skin.Main2_icon_size;
if (item.bInline && mainIconSize==MenuSkin::ICON_SIZE_NONE)
mainIconSize=s_Skin.Main_icon_size;

CItemManager::TIconSizeType iconSizeType;
int refreshFlags;
if (bSearchProvider7 || m_bSubMenu)
Expand Down