Fix Notepad++ dockable panels lose bg color issue when swiching it back

It's rather a bug of Windows' API than the bug of Notepad++. The visual glitch comes from TreeView (FunctionList, Folder As WorkSpace, Project Panels etc ...) but ListView (ASCII Insertion Panel & Document List) works fine.
I have done some fixes about this issue. However, it's not perfect when use mouse to do the snapshot.
OTOH, once the click done to show Notepad++, it becomes normal.
This is the best fix I can offer for this bug.

Fix #2202, fix #2937, fix #5980, fix #8980, fix #9905, fix #10091
This commit is contained in:
Don Ho 2021-12-01 02:32:33 +01:00
parent bab3573be7
commit e87342fef6
3 changed files with 35 additions and 1 deletions

View File

@ -1768,6 +1768,39 @@ LRESULT Notepad_plus::process(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPa
_pEditView->execute(SCI_SETXOFFSET, x);
x = _pNonEditView->execute(SCI_GETXOFFSET);
_pNonEditView->execute(SCI_SETXOFFSET, x);
if (_pFileBrowser && _pFileBrowser->isVisible())
{
_pFileBrowser->redraw(true);
}
if (_pFuncList && _pFuncList->isVisible())
{
_pFuncList->redraw(true);
}
if (_pClipboardHistoryPanel && _pClipboardHistoryPanel->isVisible())
{
_pClipboardHistoryPanel->redraw(true);
}
if (_pDocMap && _pDocMap->isVisible())
{
_pDocMap->redraw(true);
}
if (_pProjectPanel_1 && _pProjectPanel_1->isVisible())
{
_pProjectPanel_1->redraw(true);
}
if (_pProjectPanel_2 && _pProjectPanel_2->isVisible())
{
_pProjectPanel_2->redraw(true);
}
if (_pProjectPanel_3 && _pProjectPanel_3->isVisible())
{
_pProjectPanel_3->redraw(true);
}
}
return TRUE;
}

View File

@ -315,6 +315,7 @@ void DocumentMap::scrollMap(bool direction, moveMode whichMode)
void DocumentMap::redraw(bool) const
{
_pMapView->execute(SCI_COLOURISE, 0, -1);
DockingDlgInterface::redraw(true);
}
INT_PTR CALLBACK DocumentMap::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam)

View File

@ -114,7 +114,7 @@ struct SortingData4lParam {
SortingData4lParam(generic_string rootPath, generic_string label, bool isFolder) : _rootPath(rootPath), _label(label), _isFolder(isFolder) {}
};
;
class FileBrowser : public DockingDlgInterface {
public: