From 2c9ad7ac272693502cf52fa1cb0ce739c534b0dc Mon Sep 17 00:00:00 2001 From: Don Ho Date: Fri, 31 Oct 2014 21:22:43 +0000 Subject: [PATCH] [BUG_FIXED] (Author: Etienne Boireau) Fix Global colors not applied to all text of the "Find result" pane. git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@1283 f5eea248-9336-0410-98b8-ebc06183d4e3 --- .../src/ScitillaComponent/FindReplaceDlg.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/PowerEditor/src/ScitillaComponent/FindReplaceDlg.cpp b/PowerEditor/src/ScitillaComponent/FindReplaceDlg.cpp index 28ea605a..bd00fee7 100644 --- a/PowerEditor/src/ScitillaComponent/FindReplaceDlg.cpp +++ b/PowerEditor/src/ScitillaComponent/FindReplaceDlg.cpp @@ -2537,6 +2537,25 @@ void Finder::setFinderStyle() { Style & styleDefault = stylers.getStyler(iStyleDefault); _scintView.setStyle(styleDefault); + + GlobalOverride & go = _scintView._pParameter->getGlobalOverrideStyle(); + if (go.isEnable()) + { + int iGlobalOverride = stylers.getStylerIndexByName(TEXT("Global override")); + if (iGlobalOverride != -1) + { + Style & styleGlobalOverride = stylers.getStyler(iGlobalOverride); + if (go.enableFg) + { + styleDefault._fgColor = styleGlobalOverride._fgColor; + } + if (go.enableBg) + { + styleDefault._bgColor = styleGlobalOverride._bgColor; + } + } + } + _scintView.execute(SCI_STYLESETFORE, SCE_SEARCHRESULT_DEFAULT, styleDefault._fgColor); _scintView.execute(SCI_STYLESETBACK, SCE_SEARCHRESULT_DEFAULT, styleDefault._bgColor); }