diff options
| author | nyamatongwe <unknown> | 2011-04-22 11:07:17 +1000 | 
|---|---|---|
| committer | nyamatongwe <unknown> | 2011-04-22 11:07:17 +1000 | 
| commit | 0f95f4cd81c0c0d226ad64193b18d8d956474cf0 (patch) | |
| tree | d1d86e92c06c489ff3099d47a37ade0b702e4c3e /src | |
| parent | 92d2913315bfaad28110770950e0a78ec5a5f871 (diff) | |
| download | scintilla-mirror-0f95f4cd81c0c0d226ad64193b18d8d956474cf0.tar.gz | |
INDIC_ROUNDBOX can set alpha of outline. Feature #3290434.
From Marko Njezic.
Diffstat (limited to 'src')
| -rw-r--r-- | src/Editor.cxx | 10 | ||||
| -rw-r--r-- | src/Indicator.cxx | 2 | ||||
| -rw-r--r-- | src/Indicator.h | 3 | 
3 files changed, 13 insertions, 2 deletions
| 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);  }; | 
