Added separate tray icon resource for high DPI conditions

This commit is contained in:
Birunthan Mohanathas 2012-04-22 17:47:19 +03:00
parent 1d747d79f1
commit a85ecc9b7c
3 changed files with 3 additions and 2 deletions

View File

@ -52,3 +52,4 @@ VS_VERSION_INFO VERSIONINFO
// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
IDI_RAINMETER ICON DISCARDABLE "Rainmeter.ico"
IDI_TRAY ICON DISCARDABLE "Tray.ico"

BIN
Application/Tray.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

View File

@ -263,7 +263,7 @@ HICON CTrayWindow::CreateTrayIcon(double value)
if (loadIconMetric)
{
HICON icon;
HRESULT hr = loadIconMetric(hExe, MAKEINTRESOURCE(IDI_RAINMETER), LIM_SMALL, &icon);
HRESULT hr = loadIconMetric(hExe, MAKEINTRESOURCE(IDI_TRAY), LIM_SMALL, &icon);
if (SUCCEEDED(hr))
{
return icon;
@ -271,7 +271,7 @@ HICON CTrayWindow::CreateTrayIcon(double value)
}
}
return (HICON)LoadImage(hExe, MAKEINTRESOURCE(IDI_RAINMETER), IMAGE_ICON, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), LR_SHARED);
return (HICON)LoadImage(hExe, MAKEINTRESOURCE(IDI_TRAY), IMAGE_ICON, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), LR_SHARED);
}
void CTrayWindow::ReadConfig(CConfigParser& parser)