[BUG_FIXED] Update internal docking dialog colors while selecting themes.
git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@1260 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
parent
f3407442db
commit
a8ebab987f
|
@ -4631,7 +4631,7 @@ void Notepad_plus::notifyBufferActivated(BufferID bufid, int view)
|
|||
if (_pDocMap && (!_pDocMap->isClosed()) && _pDocMap->isVisible())
|
||||
{
|
||||
_pDocMap->reloadMap();
|
||||
_pDocMap->setSyntaxLiliting();
|
||||
_pDocMap->setSyntaxHiliting();
|
||||
}
|
||||
|
||||
if (_pFuncList && (!_pFuncList->isClosed()) && _pFuncList->isVisible())
|
||||
|
|
|
@ -1398,9 +1398,11 @@ LRESULT Notepad_plus::process(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lPa
|
|||
{
|
||||
//reset styler for change in Stylers.xml
|
||||
_mainEditView.defineDocType(_mainEditView.getCurrentBuffer()->getLangType());
|
||||
_subEditView.defineDocType(_subEditView.getCurrentBuffer()->getLangType());
|
||||
_mainEditView.performGlobalStyles();
|
||||
|
||||
_subEditView.defineDocType(_subEditView.getCurrentBuffer()->getLangType());
|
||||
_subEditView.performGlobalStyles();
|
||||
|
||||
_findReplaceDlg.updateFinderScintilla();
|
||||
|
||||
drawTabbarColoursFromStylerArray();
|
||||
|
@ -1413,45 +1415,50 @@ LRESULT Notepad_plus::process(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lPa
|
|||
(NppParameters::getInstance())->setCurrentDefaultBgColor(style._bgColor);
|
||||
|
||||
// Set default fg/bg colors on internal docking dialog
|
||||
if (_pFuncList)
|
||||
if (_pFuncList && _pFuncList->isCreated() && _pFuncList->isVisible())
|
||||
{
|
||||
_pFuncList->setBackgroundColor(style._bgColor);
|
||||
_pFuncList->setForegroundColor(style._fgColor);
|
||||
}
|
||||
|
||||
if (_pAnsiCharPanel)
|
||||
if (_pAnsiCharPanel && _pAnsiCharPanel->isCreated() && _pAnsiCharPanel->isVisible())
|
||||
{
|
||||
_pAnsiCharPanel->setBackgroundColor(style._bgColor);
|
||||
_pAnsiCharPanel->setForegroundColor(style._fgColor);
|
||||
}
|
||||
|
||||
if (_pFileSwitcherPanel)
|
||||
if (_pFileSwitcherPanel && _pFileSwitcherPanel->isCreated() && _pFileSwitcherPanel->isVisible())
|
||||
{
|
||||
_pFileSwitcherPanel->setBackgroundColor(style._bgColor);
|
||||
_pFileSwitcherPanel->setForegroundColor(style._fgColor);
|
||||
}
|
||||
|
||||
if (_pClipboardHistoryPanel)
|
||||
if (_pClipboardHistoryPanel && _pClipboardHistoryPanel->isCreated() && _pClipboardHistoryPanel->isVisible())
|
||||
{
|
||||
_pClipboardHistoryPanel->setBackgroundColor(style._bgColor);
|
||||
_pClipboardHistoryPanel->setForegroundColor(style._fgColor);
|
||||
_pClipboardHistoryPanel->redraw(true);
|
||||
}
|
||||
|
||||
if (_pProjectPanel_1)
|
||||
if (_pProjectPanel_1 && _pProjectPanel_1->isCreated() && _pProjectPanel_1->isVisible())
|
||||
{
|
||||
_pProjectPanel_1->setBackgroundColor(style._bgColor);
|
||||
_pProjectPanel_1->setForegroundColor(style._fgColor);
|
||||
}
|
||||
if (_pProjectPanel_2)
|
||||
if (_pProjectPanel_2 && _pProjectPanel_2->isCreated() && _pProjectPanel_2->isVisible())
|
||||
{
|
||||
_pProjectPanel_2->setBackgroundColor(style._bgColor);
|
||||
_pProjectPanel_2->setForegroundColor(style._fgColor);
|
||||
}
|
||||
if (_pProjectPanel_3)
|
||||
if (_pProjectPanel_3 && _pProjectPanel_3->isCreated() && _pProjectPanel_3->isVisible())
|
||||
{
|
||||
_pProjectPanel_3->setBackgroundColor(style._bgColor);
|
||||
_pProjectPanel_3->setForegroundColor(style._fgColor);
|
||||
}
|
||||
if (_pDocMap && _pDocMap->isCreated() && _pDocMap->isVisible())
|
||||
{
|
||||
_pDocMap->setSyntaxHiliting();
|
||||
}
|
||||
|
||||
// Notify plugins of update to styles xml
|
||||
SCNotification scnN;
|
||||
|
|
|
@ -64,9 +64,11 @@ public:
|
|||
virtual void setBackgroundColor(int bgColour) const {
|
||||
ListView_SetBkColor(_listView.getHSelf(), bgColour);
|
||||
ListView_SetTextBkColor(_listView.getHSelf(), bgColour);
|
||||
_listView.redraw(true);
|
||||
};
|
||||
virtual void setForegroundColor(int fgColour) const {
|
||||
ListView_SetTextColor(_listView.getHSelf(), fgColour);
|
||||
_listView.redraw(true);
|
||||
};
|
||||
|
||||
protected:
|
||||
|
|
|
@ -35,7 +35,6 @@ void DocumentMap::reloadMap()
|
|||
{
|
||||
if (_pScintillaEditView && _ppEditView)
|
||||
{
|
||||
|
||||
Document currentDoc = (*_ppEditView)->execute(SCI_GETDOCPOINTER);
|
||||
_pScintillaEditView->execute(SCI_SETDOCPOINTER, 0, (LPARAM)currentDoc);
|
||||
|
||||
|
@ -61,7 +60,7 @@ void DocumentMap::reloadMap()
|
|||
}
|
||||
}
|
||||
|
||||
void DocumentMap::setSyntaxLiliting()
|
||||
void DocumentMap::setSyntaxHiliting()
|
||||
{
|
||||
Buffer *buf = _pScintillaEditView->getCurrentBuffer();
|
||||
_pScintillaEditView->defineDocType(buf->getLangType());
|
||||
|
@ -253,6 +252,10 @@ void DocumentMap::scrollMap(bool direction, moveMode whichMode)
|
|||
scrollMap();
|
||||
}
|
||||
|
||||
void DocumentMap::redraw(bool) const
|
||||
{
|
||||
_pScintillaEditView->execute(SCI_COLOURISE, 0, -1);
|
||||
}
|
||||
|
||||
BOOL CALLBACK DocumentMap::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
|
@ -275,7 +278,7 @@ BOOL CALLBACK DocumentMap::run_dlgProc(UINT message, WPARAM wParam, LPARAM lPara
|
|||
_vzDlg.doDialog();
|
||||
(NppParameters::getInstance())->SetTransparent(_vzDlg.getHSelf(), 50); // 0 <= transparancy < 256
|
||||
|
||||
setSyntaxLiliting();
|
||||
setSyntaxHiliting();
|
||||
|
||||
_pScintillaEditView->showMargin(0, false);
|
||||
_pScintillaEditView->showMargin(1, false);
|
||||
|
@ -319,7 +322,7 @@ BOOL CALLBACK DocumentMap::run_dlgProc(UINT message, WPARAM wParam, LPARAM lPara
|
|||
{
|
||||
_vzDlg.display();
|
||||
reloadMap();
|
||||
setSyntaxLiliting();
|
||||
setSyntaxHiliting();
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
|
@ -112,6 +112,8 @@ public:
|
|||
_vzDlg.display();
|
||||
};
|
||||
|
||||
virtual void redraw(bool forceUpdate = false) const;
|
||||
|
||||
void setParent(HWND parent2set){
|
||||
_hParent = parent2set;
|
||||
};
|
||||
|
@ -128,7 +130,7 @@ public:
|
|||
void doMove();
|
||||
void fold(int line, bool foldOrNot);
|
||||
void foldAll(bool mode);
|
||||
void setSyntaxLiliting();
|
||||
void setSyntaxHiliting();
|
||||
|
||||
protected:
|
||||
virtual BOOL CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam);
|
||||
|
|
|
@ -74,10 +74,12 @@ public:
|
|||
void setBackgroundColor(COLORREF bgColour) {
|
||||
ListView_SetBkColor(_hSelf, bgColour);
|
||||
ListView_SetTextBkColor(_hSelf, bgColour);
|
||||
redraw(true);
|
||||
};
|
||||
|
||||
void setForegroundColor(COLORREF fgColour) {
|
||||
ListView_SetTextColor(_hSelf, fgColour);
|
||||
redraw(true);
|
||||
};
|
||||
|
||||
protected:
|
||||
|
|
Loading…
Reference in New Issue