Apply dark mode on run a macro multiple times dlg

Fix #10273, close #10274
pull/10284/head
ozone10 3 years ago committed by Don Ho
parent 31c72b7388
commit 14da158cad

@ -46,6 +46,8 @@ INT_PTR CALLBACK RunMacroDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM)
{
case WM_INITDIALOG :
{
NppDarkMode::autoSubclassAndThemeChildControls(_hSelf);
initMacroList();
::SetDlgItemInt(_hSelf, IDC_M_RUN_TIMES, _times, FALSE);
switch (_mode)
@ -62,7 +64,50 @@ INT_PTR CALLBACK RunMacroDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM)
return TRUE;
}
case WM_CTLCOLOREDIT:
{
if (NppDarkMode::isEnabled())
{
return NppDarkMode::onCtlColorSofter(reinterpret_cast<HDC>(wParam));
}
break;
}
case WM_CTLCOLORLISTBOX:
{
if (NppDarkMode::isEnabled())
{
return NppDarkMode::onCtlColor(reinterpret_cast<HDC>(wParam));
}
break;
}
case WM_CTLCOLORDLG:
case WM_CTLCOLORSTATIC:
{
if (NppDarkMode::isEnabled())
{
return NppDarkMode::onCtlColorDarker(reinterpret_cast<HDC>(wParam));
}
break;
}
case WM_PRINTCLIENT:
{
if (NppDarkMode::isEnabled())
{
return TRUE;
}
break;
}
case NPPM_INTERNAL_REFRESHDARKMODE:
{
NppDarkMode::autoThemeChildControls(_hSelf);
return TRUE;
}
case WM_COMMAND :
{
if (HIWORD(wParam) == EN_CHANGE)
@ -132,4 +177,3 @@ int RunMacroDlg::getMacro2Exec() const
bool isCurMacroPresent = ::SendMessage(_hParent, WM_GETCURRENTMACROSTATUS, 0, 0) == MACRO_RECORDING_HAS_STOPPED;
return isCurMacroPresent?(_macroIndex - 1):_macroIndex;
}

Loading…
Cancel
Save