mirror of
https://github.com/reactos/reactos.git
synced 2024-11-28 05:53:31 +08:00
[SYSDM] Improve license dialog icon (#4773)
- Use `mimetypes/application-certificate` icon from Tango Icon Theme 0.8.90 instead of `IDI_CPLSYSTEM` - Set large icon correctly - Add NULL check for DestroyIcon - Minor code formatting
This commit is contained in:
parent
bbef618032
commit
9cc9a26392
@ -12,6 +12,7 @@
|
||||
typedef struct _LIC_CONTEXT
|
||||
{
|
||||
HICON hIcon;
|
||||
HICON hIconSm;
|
||||
} LIC_CONTEXT, *PLIC_CONTEXT;
|
||||
|
||||
|
||||
@ -23,16 +24,20 @@ OnInitDialog(HWND hDlg, PLIC_CONTEXT pLicInfo)
|
||||
PCSTR LicenseText;
|
||||
|
||||
pLicInfo->hIcon = LoadImage(hApplet,
|
||||
MAKEINTRESOURCE(IDI_CPLSYSTEM),
|
||||
MAKEINTRESOURCE(IDI_LICENSE),
|
||||
IMAGE_ICON,
|
||||
16,
|
||||
16,
|
||||
0);
|
||||
GetSystemMetrics(SM_CXICON),
|
||||
GetSystemMetrics(SM_CYICON),
|
||||
LR_DEFAULTCOLOR);
|
||||
pLicInfo->hIconSm = LoadImage(hApplet,
|
||||
MAKEINTRESOURCE(IDI_LICENSE),
|
||||
IMAGE_ICON,
|
||||
GetSystemMetrics(SM_CXSMICON),
|
||||
GetSystemMetrics(SM_CYSMICON),
|
||||
LR_DEFAULTCOLOR);
|
||||
|
||||
SendMessage(hDlg,
|
||||
WM_SETICON,
|
||||
ICON_SMALL,
|
||||
(LPARAM)pLicInfo->hIcon);
|
||||
SendMessage(hDlg, WM_SETICON, ICON_BIG, (LPARAM)pLicInfo->hIcon);
|
||||
SendMessage(hDlg, WM_SETICON, ICON_SMALL, (LPARAM)pLicInfo->hIconSm);
|
||||
|
||||
/* Load license from resource */
|
||||
if (!(hResInfo = FindResource(hApplet,
|
||||
@ -86,7 +91,12 @@ LicenceDlgProc(HWND hDlg,
|
||||
case WM_DESTROY:
|
||||
if (pLicInfo)
|
||||
{
|
||||
DestroyIcon(pLicInfo->hIcon);
|
||||
if (pLicInfo->hIconSm)
|
||||
DestroyIcon(pLicInfo->hIconSm);
|
||||
|
||||
if (pLicInfo->hIcon)
|
||||
DestroyIcon(pLicInfo->hIcon);
|
||||
|
||||
HeapFree(GetProcessHeap(), 0, pLicInfo);
|
||||
}
|
||||
break;
|
||||
|
@ -6,6 +6,7 @@
|
||||
#define IDI_DEVMGR 51
|
||||
#define IDI_HARDPROF 52
|
||||
#define IDI_USERPROF 53
|
||||
#define IDI_LICENSE 54
|
||||
#define IDI_UP 2500
|
||||
#define IDI_DOWN 2501
|
||||
#define IDI_ADDHW 2502
|
||||
|
BIN
dll/cpl/sysdm/resources/license.ico
Normal file
BIN
dll/cpl/sysdm/resources/license.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 25 KiB |
@ -16,6 +16,7 @@ IDI_CPLSYSTEM ICON "resources/applet.ico"
|
||||
IDI_USERPROF ICON "resources/devmgr.ico"
|
||||
IDI_HARDPROF ICON "resources/hwprofile.ico"
|
||||
IDI_DEVMGR ICON "resources/dev.ico"
|
||||
IDI_LICENSE ICON "resources/license.ico"
|
||||
IDI_UP ICON "resources/up.ico"
|
||||
IDI_DOWN ICON "resources/down.ico"
|
||||
IDI_ADDHW ICON "resources/addhw.ico"
|
||||
|
Loading…
Reference in New Issue
Block a user