Replace GetSystemMetrics with new dpi manager's ones
- remove unneeded declarations in NppDarkMode.h ref 5123016#r142224732 ref #14959 Close #15171pull/15173/head
parent
49340a8707
commit
4ad57c1dd1
|
@ -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<LPNMTBCUSTOMDRAW>(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<LPNMLVCUSTOMDRAW>(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<LPNMTVCUSTOMDRAW>(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)
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
};
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue