diff --git a/PowerEditor/src/NppDarkMode.cpp b/PowerEditor/src/NppDarkMode.cpp index 0d58d318c..2fcc09eab 100644 --- a/PowerEditor/src/NppDarkMode.cpp +++ b/PowerEditor/src/NppDarkMode.cpp @@ -2576,7 +2576,7 @@ namespace NppDarkMode } } - LRESULT darkToolBarNotifyCustomDraw(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, bool isPlugin) + static LRESULT darkToolBarNotifyCustomDraw(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, bool isPlugin) { auto nmtbcd = reinterpret_cast(lParam); static int roundCornerValue = 0; @@ -2672,7 +2672,7 @@ namespace NppDarkMode return ::DefSubclassProc(hWnd, uMsg, wParam, lParam); } - LRESULT darkListViewNotifyCustomDraw(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, bool isPlugin) + static LRESULT darkListViewNotifyCustomDraw(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, bool isPlugin) { auto lplvcd = reinterpret_cast(lParam); @@ -2732,7 +2732,7 @@ namespace NppDarkMode return ::DefSubclassProc(hWnd, uMsg, wParam, lParam); } - LRESULT darkTreeViewNotifyCustomDraw(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, bool isPlugin) + static LRESULT darkTreeViewNotifyCustomDraw(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, bool isPlugin) { auto lptvcd = reinterpret_cast(lParam); @@ -3311,7 +3311,7 @@ namespace NppDarkMode } } - BOOL CALLBACK enumAutocompleteProc(HWND hwnd, LPARAM /*lParam*/) + static BOOL CALLBACK enumAutocompleteProc(HWND hwnd, LPARAM /*lParam*/) { constexpr size_t classNameLen = 16; TCHAR className[classNameLen]{}; @@ -3330,7 +3330,7 @@ namespace NppDarkMode // set dark scrollbar for autocomplete list void setDarkAutoCompletion() { - ::EnumThreadWindows(::GetCurrentThreadId(), (WNDENUMPROC)enumAutocompleteProc, 0); + ::EnumThreadWindows(::GetCurrentThreadId(), enumAutocompleteProc, 0); } LRESULT onCtlColor(HDC hdc) diff --git a/PowerEditor/src/NppDarkMode.h b/PowerEditor/src/NppDarkMode.h index dc83524e9..8dbab843a 100644 --- a/PowerEditor/src/NppDarkMode.h +++ b/PowerEditor/src/NppDarkMode.h @@ -215,10 +215,6 @@ namespace NppDarkMode void autoSubclassAndThemeChildControls(HWND hwndParent, bool subclass = true, bool theme = true); void autoThemeChildControls(HWND hwndParent); - static LRESULT darkToolBarNotifyCustomDraw(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, bool isPlugin); - static LRESULT darkListViewNotifyCustomDraw(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, bool isPlugin); - static LRESULT darkTreeViewNotifyCustomDraw(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, bool isPlugin); - void autoSubclassAndThemePluginDockWindow(HWND hwnd); ULONG autoSubclassAndThemePlugin(HWND hwnd, ULONG dmFlags); void autoSubclassAndThemeWindowNotify(HWND hwnd); @@ -236,7 +232,6 @@ namespace NppDarkMode bool isThemeDark(); void setBorder(HWND hwnd, bool border = true); - BOOL CALLBACK enumAutocompleteProc(HWND hwnd, LPARAM lParam); void setDarkAutoCompletion(); LRESULT onCtlColor(HDC hdc); diff --git a/PowerEditor/src/WinControls/PluginsAdmin/pluginsAdmin.cpp b/PowerEditor/src/WinControls/PluginsAdmin/pluginsAdmin.cpp index d5269975b..c5fcad4a5 100644 --- a/PowerEditor/src/WinControls/PluginsAdmin/pluginsAdmin.cpp +++ b/PowerEditor/src/WinControls/PluginsAdmin/pluginsAdmin.cpp @@ -145,7 +145,7 @@ void PluginsAdminDlg::create(int dialogID, bool isRTL, bool msgDestParent) RECT rcDesc{}; getMappedChildRect(IDC_PLUGINADM_EDIT, rcDesc); - const long margeX = ::GetSystemMetrics(SM_CXEDGE); + const long margeX = _dpiManager.getSystemMetricsForDpi(SM_CXEDGE); const long margeY = _dpiManager.scale(13); rect.bottom = rcDesc.bottom + margeY; @@ -158,7 +158,7 @@ void PluginsAdminDlg::create(int dialogID, bool isRTL, bool msgDestParent) RECT listRect{ rcDesc.left - margeX, rcSearch.bottom + margeY, - rcDesc.right + ::GetSystemMetrics(SM_CXVSCROLL) + margeX, + rcDesc.right + _dpiManager.getSystemMetricsForDpi(SM_CXVSCROLL) + margeX, rcDesc.top - margeY }; diff --git a/PowerEditor/src/WinControls/Preference/preferenceDlg.cpp b/PowerEditor/src/WinControls/Preference/preferenceDlg.cpp index e447cd375..d3178a8f1 100644 --- a/PowerEditor/src/WinControls/Preference/preferenceDlg.cpp +++ b/PowerEditor/src/WinControls/Preference/preferenceDlg.cpp @@ -5113,8 +5113,8 @@ void DelimiterSubDlg::calcCtrlsPos() getMappedChildRect(IDD_STATIC_OPENDELIMITER, rcOpen); getMappedChildRect(IDC_EDIT_OPENDELIMITER, rcOpenEdit); - _gapEditHor = (rcBlabla.left - rcOpenEdit.right) - ::GetSystemMetrics(SM_CXEDGE); - _gapEditVer = (rcBlabla.top - rcOpenEdit.top) + ::GetSystemMetrics(SM_CYEDGE); + _gapEditHor = (rcBlabla.left - rcOpenEdit.right) - _dpiManager.getSystemMetricsForDpi(SM_CXEDGE); + _gapEditVer = (rcBlabla.top - rcOpenEdit.top) + _dpiManager.getSystemMetricsForDpi(SM_CYEDGE); _gapText = (rcBlabla.left - rcOpen.right); }