From e904ecce4b1fc41ec71ed600669c5d4f96eeffec Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Fri, 22 Apr 2011 11:07:17 +1000 Subject: INDIC_ROUNDBOX can set alpha of outline. Feature #3290434. From Marko Njezic. --- src/Editor.cxx | 10 ++++++++++ src/Indicator.cxx | 2 +- src/Indicator.h | 3 ++- 3 files changed, 13 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/Editor.cxx b/src/Editor.cxx index b0560e758..2e8654ca4 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -8212,6 +8212,16 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) { case SCI_INDICGETALPHA: return (wParam <= INDIC_MAX) ? vs.indicators[wParam].fillAlpha : 0; + case SCI_INDICSETOUTLINEALPHA: + if (wParam <= INDIC_MAX && lParam >=0 && lParam <= 255) { + vs.indicators[wParam].outlineAlpha = lParam; + InvalidateStyleRedraw(); + } + break; + + case SCI_INDICGETOUTLINEALPHA: + return (wParam <= INDIC_MAX) ? vs.indicators[wParam].outlineAlpha : 0; + case SCI_SETINDICATORCURRENT: pdoc->decorations.SetCurrentIndicator(wParam); break; diff --git a/src/Indicator.cxx b/src/Indicator.cxx index da9531224..f4e137286 100644 --- a/src/Indicator.cxx +++ b/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, fillAlpha, fore.allocated, 50, 0); + surface->AlphaRectangle(rcBox, 1, fore.allocated, fillAlpha, fore.allocated, outlineAlpha, 0); } else { // Either INDIC_PLAIN or unknown surface->MoveTo(rc.left, ymid); surface->LineTo(rc.right, ymid); diff --git a/src/Indicator.h b/src/Indicator.h index 42b56f07e..e787b592d 100644 --- a/src/Indicator.h +++ b/src/Indicator.h @@ -20,7 +20,8 @@ public: bool under; ColourPair fore; int fillAlpha; - Indicator() : style(INDIC_PLAIN), under(false), fore(ColourDesired(0,0,0)), fillAlpha(30) { + int outlineAlpha; + Indicator() : style(INDIC_PLAIN), under(false), fore(ColourDesired(0,0,0)), fillAlpha(30), outlineAlpha(50) { } void Draw(Surface *surface, const PRectangle &rc, const PRectangle &rcLine); }; -- cgit v1.2.3