Fix corrupted icons in second column (#1088)

When using skin with a different second column icon size, all of the
icons in it would become blank.

Because m_bTwoColumns is set after AddStandardItems, it is still false
in the column break check. As a workaround, use the value it's assigned
later in InitWindowInternal instead.

Fix Open-Shell/Open-Shell-Menu#980
This commit is contained in:
among-us-official
2022-08-11 23:46:12 +03:00
committed by GitHub
parent 47cc2b2304
commit b89aaed785

View File

@@ -1084,7 +1084,8 @@ void CMenuContainer::AddStandardItems( void )
if (m_bSubMenu && pStdItem->id==s_ShutdownCommand)
continue;
if (pStdItem->id==MENU_COLUMN_BREAK && m_bTwoColumns)
const bool bTwoColumns = (!m_bSubMenu && s_Skin.TwoColumns);
if (pStdItem->id==MENU_COLUMN_BREAK && bTwoColumns)
mainIconSize=s_Skin.Main2_icon_size;
int stdOptions=GetStdOptions(pStdItem->id);