Select Apps icon based on Windows version

We now have nicer Apps icons for Win10/11 so we will select proper icon
based on Windows version.
This commit is contained in:
ge0rdi
2022-12-30 12:16:01 +01:00
parent 7f492f3a9f
commit 344aa60893

View File

@@ -1123,6 +1123,14 @@ const CItemManager::ItemInfo *CItemManager::GetCustomIcon( const wchar_t *path,
*c=0;
index=-_wtol(c+1);
}
// special handling for Apps icon
if (!text[0] && index==-IDI_APPSICON)
{
if (IsWin11())
index=-IDI_APPSICON11;
else if (GetWinVersion()==WIN_VER_WIN10)
index=-IDI_APPSICON10;
}
return GetCustomIcon(text,index,iconSizeType,false);
}