diff --git a/PowerEditor/src/Notepad_plus.rc b/PowerEditor/src/Notepad_plus.rc index 741250e5b..222cb5921 100644 --- a/PowerEditor/src/Notepad_plus.rc +++ b/PowerEditor/src/Notepad_plus.rc @@ -52,6 +52,7 @@ END // remains consistent on all systems. IDI_M30ICON ICON "icons/npp.ico" IDI_CHAMELEON ICON "icons/chameleon.ico" +IDI_CHAMELEON_DM ICON "icons/darkMode/about/chameleon.ico" //IDI_JESUISCHARLIE ICON "icons/Je_suis_Charlie.ico" //IDI_GILETJAUNE ICON "icons/giletJaune.ico" //IDI_SAMESEXMARRIAGE ICON "icons/same-sexMarriageTaiwan.ico" @@ -1189,18 +1190,19 @@ STYLE DS_SETFONT | DS_FIXEDSYS | WS_POPUP | WS_BORDER | WS_SYSMENU FONT 8, TEXT("MS Shell Dlg"), 0, 0, 0x1 BEGIN EDITTEXT IDC_BUILD_DATETIME,150,2,150,10, ES_READONLY | NOT WS_BORDER - CONTROL "",IDI_CHAMELEON,"Static",SS_OWNERDRAW,20,5,64,64 + CONTROL "",IDI_CHAMELEON,"Static",SS_OWNERDRAW,20,10,128,128 + CONTROL "",IDI_CHAMELEON_DM "Static",SS_OWNERDRAW,20,10,128,128 //CONTROL "",IDI_JESUISCHARLIE,"Static",SS_OWNERDRAW,20,5,64,64 //CONTROL "",IDI_GILETJAUNE,"Static",SS_OWNERDRAW,20,5,64,64 //CONTROL "", IDI_SAMESEXMARRIAGE,"Static",SS_OWNERDRAW,20,5,64,64 - LTEXT NOTEPAD_PLUS_VERSION, IDC_STATIC,70,20,140,11 - LTEXT "bit",IDC_VERSION_BIT,150,20,140,11 + LTEXT NOTEPAD_PLUS_VERSION, IDC_STATIC,85,20,140,11 + LTEXT "bit",IDC_VERSION_BIT,160,20,140,11 //LTEXT "Author :",IDC_STATIC,21,45,31,8 //LTEXT "FREE UYGHUR",IDC_AUTHOR_NAME,70,32,70,8 //LTEXT "Stand with Hong Kong",IDC_AUTHOR_NAME,70,32,80,8 //LTEXT "pour Samuel Paty",IDC_AUTHOR_NAME,70,32,80,8 - LTEXT "Home:",IDC_STATIC,21,52,47,8 - LTEXT "https://notepad-plus-plus.org/",IDC_HOME_ADDR,50,52,126,8 + LTEXT "Home:",IDC_STATIC,21,55,47,8 + LTEXT "https://notepad-plus-plus.org/",IDC_HOME_ADDR,50,55,126,8 GROUPBOX "GNU General Public Licence",IDC_STATIC,19,75,231,131,BS_CENTER DEFPUSHBUTTON "OK",IDOK,106,215,50,14,BS_FLAT // IDC_LICENCE_EDIT should be the last line, don't know why diff --git a/PowerEditor/src/WinControls/AboutDlg/AboutDlg.cpp b/PowerEditor/src/WinControls/AboutDlg/AboutDlg.cpp index 8162b1775..00b5d3154 100644 --- a/PowerEditor/src/WinControls/AboutDlg/AboutDlg.cpp +++ b/PowerEditor/src/WinControls/AboutDlg/AboutDlg.cpp @@ -90,13 +90,21 @@ INT_PTR CALLBACK AboutDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM lPara case WM_DRAWITEM : { DPIManager& dpiManager = NppParameters::getInstance()._dpiManager; + int iconSideSize = 64; + int w = dpiManager.scaleX(iconSideSize); + int h = dpiManager.scaleY(iconSideSize); + + HICON hIcon; + if (NppDarkMode::isEnabled()) + hIcon = (HICON)::LoadImage(_hInst, MAKEINTRESOURCE(IDI_CHAMELEON_DM), IMAGE_ICON, w, h, LR_DEFAULTSIZE); + else + hIcon = (HICON)::LoadImage(_hInst, MAKEINTRESOURCE(IDI_CHAMELEON), IMAGE_ICON, w, h, LR_DEFAULTSIZE); - HICON hIcon = (HICON)::LoadImage(_hInst, MAKEINTRESOURCE(IDI_CHAMELEON), IMAGE_ICON, 64, 64, LR_DEFAULTSIZE); //HICON hIcon = (HICON)::LoadImage(_hInst, MAKEINTRESOURCE(IDI_JESUISCHARLIE), IMAGE_ICON, 64, 64, LR_DEFAULTSIZE); //HICON hIcon = (HICON)::LoadImage(_hInst, MAKEINTRESOURCE(IDI_GILETJAUNE), IMAGE_ICON, 64, 64, LR_DEFAULTSIZE); //HICON hIcon = (HICON)::LoadImage(_hInst, MAKEINTRESOURCE(IDI_SAMESEXMARRIAGE), IMAGE_ICON, 64, 64, LR_DEFAULTSIZE); DRAWITEMSTRUCT *pdis = (DRAWITEMSTRUCT *)lParam; - ::DrawIconEx(pdis->hDC, 0, 0, hIcon, dpiManager.scaleX(48), dpiManager.scaleY(48), 0, NULL, DI_NORMAL); + ::DrawIconEx(pdis->hDC, 0, 0, hIcon, w, h, 0, NULL, DI_NORMAL); return TRUE; } diff --git a/PowerEditor/src/icons/chameleon.ico b/PowerEditor/src/icons/chameleon.ico index 636c56c5e..c63ccb578 100644 Binary files a/PowerEditor/src/icons/chameleon.ico and b/PowerEditor/src/icons/chameleon.ico differ diff --git a/PowerEditor/src/icons/darkMode/about/chameleon.ico b/PowerEditor/src/icons/darkMode/about/chameleon.ico new file mode 100644 index 000000000..3df2f05e0 Binary files /dev/null and b/PowerEditor/src/icons/darkMode/about/chameleon.ico differ diff --git a/PowerEditor/src/resource.h b/PowerEditor/src/resource.h index 51a1cbf88..e7afbb06a 100644 --- a/PowerEditor/src/resource.h +++ b/PowerEditor/src/resource.h @@ -35,6 +35,7 @@ #define IDI_M30ICON 100 #define IDI_CHAMELEON 101 +#define IDI_CHAMELEON_DM 102 //#define IDI_JESUISCHARLIE 102 //#define IDI_GILETJAUNE 102 //#define IDI_SAMESEXMARRIAGE 102