diff --git a/PowerEditor/src/ScitillaComponent/ScintillaEditView.cpp b/PowerEditor/src/ScitillaComponent/ScintillaEditView.cpp index afd6b441..1dbfeb6c 100644 --- a/PowerEditor/src/ScitillaComponent/ScintillaEditView.cpp +++ b/PowerEditor/src/ScitillaComponent/ScintillaEditView.cpp @@ -171,6 +171,10 @@ void ScintillaEditView::init(HINSTANCE hInst, HWND hPere) execute(SCI_INDICSETSTYLE, SCE_UNIVERSAL_FOUND_STYLE, INDIC_ROUNDBOX); execute(SCI_INDICSETSTYLE, SCE_UNIVERSAL_FOUND_STYLE_INC, INDIC_ROUNDBOX); + execute(SCI_INDICSETALPHA, SCE_UNIVERSAL_FOUND_STYLE_2, 100); + execute(SCI_INDICSETALPHA, SCE_UNIVERSAL_FOUND_STYLE, 100); + execute(SCI_INDICSETALPHA, SCE_UNIVERSAL_FOUND_STYLE_INC, 100); + _pParameter = NppParameters::getInstance(); _codepage = ::GetACP(); diff --git a/scintilla/include/Scintilla.h b/scintilla/include/Scintilla.h index 03fb201f..3c5aab5e 100644 --- a/scintilla/include/Scintilla.h +++ b/scintilla/include/Scintilla.h @@ -248,6 +248,8 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam, #define SCI_INDICGETFORE 2083 #define SCI_INDICSETUNDER 2510 #define SCI_INDICGETUNDER 2511 +#define SCI_INDICSETALPHA 3097 +#define SCI_INDICGETALPHA 3098 #define SCI_SETWHITESPACEFORE 2084 #define SCI_SETWHITESPACEBACK 2085 #define SCI_SETSTYLEBITS 2090 diff --git a/scintilla/src/Editor.cxx b/scintilla/src/Editor.cxx index 8213debf..9afaaa5d 100644 --- a/scintilla/src/Editor.cxx +++ b/scintilla/src/Editor.cxx @@ -7222,6 +7222,16 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) { case SCI_INDICGETUNDER: return (wParam <= INDIC_MAX) ? vs.indicators[wParam].under : 0; + case SCI_INDICSETALPHA: + if (wParam <= INDIC_MAX && lParam <= SC_ALPHA_OPAQUE && lParam > 0) { + vs.indicators[wParam].alpha = lParam; + InvalidateStyleRedraw(); + } + break; + + case SCI_INDICGETALPHA: + return (wParam <= INDIC_MAX) ? vs.indicators[wParam].alpha : 0; + case SCI_SETINDICATORCURRENT: pdoc->decorations.SetCurrentIndicator(wParam); break; diff --git a/scintilla/src/Indicator.cxx b/scintilla/src/Indicator.cxx index 89afb789..e059f150 100644 --- a/scintilla/src/Indicator.cxx +++ b/scintilla/src/Indicator.cxx @@ -72,7 +72,7 @@ void Indicator::Draw(Surface *surface, const PRectangle &rc, const PRectangle &r rcBox.top = rcLine.top + 1; rcBox.left = rc.left; rcBox.right = rc.right; - surface->AlphaRectangle(rcBox, 1, fore.allocated, 30, fore.allocated, 50, 0); + surface->AlphaRectangle(rcBox, 1, fore.allocated, alpha, fore.allocated, ((alpha>SC_ALPHA_OPAQUE-20)?SC_ALPHA_OPAQUE:(alpha+20)), 0); } else { // Either INDIC_PLAIN or unknown surface->MoveTo(rc.left, ymid); surface->LineTo(rc.right, ymid); diff --git a/scintilla/src/Indicator.h b/scintilla/src/Indicator.h index 015a1a23..765a416b 100644 --- a/scintilla/src/Indicator.h +++ b/scintilla/src/Indicator.h @@ -17,9 +17,10 @@ namespace Scintilla { class Indicator { public: int style; + int alpha; bool under; ColourPair fore; - Indicator() : style(INDIC_PLAIN), under(false), fore(ColourDesired(0,0,0)) { + Indicator() : style(INDIC_PLAIN), alpha(30), under(false), fore(ColourDesired(0,0,0)) { } void Draw(Surface *surface, const PRectangle &rc, const PRectangle &rcLine); };