3 Commits

Author SHA1 Message Date
ge0rdi
344aa60893 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.
2022-12-30 18:14:22 +01:00
Eli Farmer
7f492f3a9f Modern looking icons for Apps folder on Win10/11. 2022-12-30 18:14:22 +01:00
ge0rdi
1c95f17460 Fixed typo [skip ci] 2022-12-29 10:24:53 +01:00
6 changed files with 15 additions and 3 deletions

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);
}

View File

@@ -768,7 +768,7 @@ IUpdateSessionOrchestrator : public IUnknown
STDMETHOD(CreateUxUpdateManager)(IUnknown**);
};
DWORD WindowsUpdateAdjustShutdwonFlags(DWORD flags)
DWORD WindowsUpdateAdjustShutdownFlags(DWORD flags)
{
DWORD retval = flags;
@@ -882,7 +882,7 @@ static bool ExecuteShutdownCommand(TMenuID menuCommand)
{
if (SetShutdownPrivileges())
{
flags = WindowsUpdateAdjustShutdwonFlags(flags);
flags = WindowsUpdateAdjustShutdownFlags(flags);
InitiateShutdown(NULL, NULL, 0, flags, SHTDN_REASON_FLAG_PLANNED);
}
else
@@ -891,7 +891,7 @@ static bool ExecuteShutdownCommand(TMenuID menuCommand)
// lets try silent elevate via SystemSettingsAdminFlows (for limited admin users only)
if (GetCurrentTokenElevationType() == TokenElevationTypeLimited)
{
flags = WindowsUpdateAdjustShutdwonFlags(flags);
flags = WindowsUpdateAdjustShutdownFlags(flags);
wchar_t cmdLine[32]{};
Sprintf(cmdLine, _countof(cmdLine), L"Shutdown %d %d", flags, SHTDN_REASON_FLAG_PLANNED);

View File

@@ -349,6 +349,8 @@ END
// remains consistent on all systems.
IDI_APPICON ICON "..\\..\\Setup\\OpenShell.ico"
IDI_APPSICON ICON "apps.ico"
IDI_APPSICON10 ICON "apps10.ico"
IDI_APPSICON11 ICON "apps11.ico"
IDI_BTN_CLASSIC ICON "btn_aero.ico"
IDI_START ICON "start.ico"
IDI_START10 ICON "start10.ico"

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

View File

@@ -4,6 +4,8 @@
//
#define IDI_APPICON 1
#define IDI_APPSICON 2
#define IDI_APPSICON10 3
#define IDI_APPSICON11 4
#define IDD_RENAME 102
#define IDC_EDITNAME 102
#define IDD_RENAMER 103