diff --git a/PowerEditor/src/Notepad_plus.cpp b/PowerEditor/src/Notepad_plus.cpp index 109d0b5c0..0798c9132 100644 --- a/PowerEditor/src/Notepad_plus.cpp +++ b/PowerEditor/src/Notepad_plus.cpp @@ -6606,9 +6606,10 @@ void Notepad_plus::launchDocumentListPanel() if (!_pDocumentListPanel) { NppParameters& nppParams = NppParameters::getInstance(); + int tabBarStatus = nppParams.getNppGUI()._tabStatus; _pDocumentListPanel = new VerticalFileSwitcher; - HIMAGELIST hImgLst = _docTabIconList.getHandle(); + HIMAGELIST hImgLst = ((tabBarStatus & TAB_ALTICONS) ? _docTabIconListAlt.getHandle() : NppDarkMode::isEnabled() ? _docTabIconListDarkMode.getHandle() : _docTabIconList.getHandle()); _pDocumentListPanel->init(_pPublicInterface->getHinst(), _pPublicInterface->getHSelf(), hImgLst); NativeLangSpeaker *pNativeSpeaker = nppParams.getNativeLangSpeaker(); bool isRTL = pNativeSpeaker->isRTL(); diff --git a/PowerEditor/src/NppBigSwitch.cpp b/PowerEditor/src/NppBigSwitch.cpp index 0db8cffd7..76902dd7c 100644 --- a/PowerEditor/src/NppBigSwitch.cpp +++ b/PowerEditor/src/NppBigSwitch.cpp @@ -740,6 +740,40 @@ LRESULT Notepad_plus::process(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPa { _mainDocTab.changeIcons(static_cast(lParam)); _subDocTab.changeIcons(static_cast(lParam)); + + //restart document list with the same icons as the DocTabs + if (_pDocumentListPanel) + { + if (!_pDocumentListPanel->isClosed()) // if doclist is open + { + //close the doclist + _pDocumentListPanel->display(false); + + //clean doclist + _pDocumentListPanel->destroy(); + _pDocumentListPanel = nullptr; + + //relaunch with new icons + launchDocumentListPanel(); + } + else //if doclist is closed + { + //clean doclist + _pDocumentListPanel->destroy(); + _pDocumentListPanel = nullptr; + + //relaunch doclist with new icons and close it + launchDocumentListPanel(); + if (_pDocumentListPanel) + { + _pDocumentListPanel->display(false); + _pDocumentListPanel->setClosed(true); + checkMenuItem(IDM_VIEW_DOCLIST, false); + _toolBar.setCheck(IDM_VIEW_DOCLIST, false); + } + } + } + return TRUE; } diff --git a/PowerEditor/src/WinControls/DockingWnd/DockingDlgInterface.h b/PowerEditor/src/WinControls/DockingWnd/DockingDlgInterface.h index 1db2c5136..384d39690 100644 --- a/PowerEditor/src/WinControls/DockingWnd/DockingDlgInterface.h +++ b/PowerEditor/src/WinControls/DockingWnd/DockingDlgInterface.h @@ -63,7 +63,9 @@ public: ::SendMessage(_hParent, NPPM_DMMUPDATEDISPINFO, 0, reinterpret_cast(_hSelf)); } - virtual void destroy() {} + virtual void destroy() { + StaticDialog::destroy(); + } virtual void setBackgroundColor(COLORREF) {} virtual void setForegroundColor(COLORREF) {}