Fix updown control style not changing when toggling dark mode

Fix https://github.com/notepad-plus-plus/notepad-plus-plus/pull/16548#issuecomment-2884419833, close #16553
This commit is contained in:
ozone10 2025-05-15 19:36:14 +02:00 committed by Don Ho
parent 5406b82fb4
commit 3548696bd7
2 changed files with 5 additions and 2 deletions

View File

@ -8606,14 +8606,16 @@ void Notepad_plus::refreshDarkMode(bool resetStyle)
NppDarkMode::setDarkTitleBar(_pPublicInterface->getHSelf());
::SetWindowPos(_pPublicInterface->getHSelf(), nullptr, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_FRAMECHANGED);
for (auto& docCont : _dockingManager.getContainerInfo())
for (const auto& docCont : _dockingManager.getContainerInfo())
{
NppDarkMode::autoThemeChildControls(docCont->getTabWnd()); // for updown child
auto hwndDocCont = docCont->getCaptionWnd();
NppDarkMode::setDarkTitleBar(hwndDocCont);
::SetWindowPos(hwndDocCont, nullptr, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_FRAMECHANGED);
}
for (auto& hwndDlg : _hModelessDlgs)
for (const auto& hwndDlg : _hModelessDlgs)
{
NppDarkMode::setDarkTitleBar(hwndDlg);
::SendMessage(hwndDlg, NPPM_INTERNAL_REFRESHDARKMODE, 0, 0);

View File

@ -666,6 +666,7 @@ LRESULT TabBarPlus::runProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lPara
case NPPM_INTERNAL_REFRESHDARKMODE:
{
NppDarkMode::autoThemeChildControls(hwnd); // for updown child
NppDarkMode::setDarkTooltips(hwnd, NppDarkMode::ToolTipsType::tabbar);
setCloseBtnImageList();
setPinBtnImageList();