diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/Editor.cxx | 15 | ||||
| -rw-r--r-- | src/Indicator.cxx | 6 | ||||
| -rw-r--r-- | src/ViewStyle.cxx | 2 | ||||
| -rw-r--r-- | src/ViewStyle.h | 1 | 
4 files changed, 23 insertions, 1 deletions
| diff --git a/src/Editor.cxx b/src/Editor.cxx index 08693815f..9df8b2e8c 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -2295,7 +2295,7 @@ void Editor::DrawLine(Surface *surface, ViewStyle &vsDraw, int line, int lineVis  	// the color for the highest numbered one is used.  	bool overrideBackground = false;  	ColourAllocated background; -	if (caret.active && vsDraw.showCaretLineBackground && ll->containsCaret) { +	if (caret.active && vsDraw.showCaretLineBackground && (vsDraw.caretLineAlpha == SC_ALPHA_NOALPHA) && ll->containsCaret) {  		overrideBackground = true;  		background = vsDraw.caretLineBackground.allocated;  	} @@ -2653,6 +2653,13 @@ void Editor::DrawLine(Surface *surface, ViewStyle &vsDraw, int line, int lineVis  		rcSegment.right = rcSegment.left + 1;  		surface->FillRectangle(rcSegment, vsDraw.edgecolour.allocated);  	} + +	if (caret.active && vsDraw.showCaretLineBackground && (vsDraw.caretLineAlpha != SC_ALPHA_NOALPHA) && ll->containsCaret) { +		rcSegment.left = xStart; +		rcSegment.right = rcLine.right - 1; +		surface->AlphaRectangle(rcSegment, 0, vsDraw.caretLineBackground.allocated, vsDraw.caretLineAlpha,  +			vsDraw.caretLineBackground.allocated, vsDraw.caretLineAlpha, 0); +	}  }  void Editor::RefreshPixMaps(Surface *surfaceWindow) { @@ -6723,6 +6730,12 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) {  		vs.caretLineBackground.desired = wParam;  		InvalidateStyleRedraw();  		break; +	case SCI_GETCARETLINEBACKALPHA: +		return vs.caretLineAlpha; +	case SCI_SETCARETLINEBACKALPHA: +		vs.caretLineAlpha = wParam; +		InvalidateStyleRedraw(); +		break;  		// Folding messages diff --git a/src/Indicator.cxx b/src/Indicator.cxx index a42abb203..7624a4a52 100644 --- a/src/Indicator.cxx +++ b/src/Indicator.cxx @@ -63,6 +63,12 @@ void Indicator::Draw(Surface *surface, const PRectangle &rc, const PRectangle &r  		surface->LineTo(rc.right, rcLine.top+1);  		surface->LineTo(rc.left, rcLine.top+1);  		surface->LineTo(rc.left, ymid+1); +	} else if (style == INDIC_ROUNDBOX) { +		PRectangle rcBox = rcLine; +		rcBox.top = rcLine.top + 1; +		rcBox.left = rc.left; +		rcBox.right = rc.right; +		surface->AlphaRectangle(rcBox, 1, fore.allocated, 30, fore.allocated, 50, 0);  	} else {	// Either INDIC_PLAIN or unknown  		surface->MoveTo(rc.left, ymid);  		surface->LineTo(rc.right, ymid); diff --git a/src/ViewStyle.cxx b/src/ViewStyle.cxx index fe519905b..f221af193 100644 --- a/src/ViewStyle.cxx +++ b/src/ViewStyle.cxx @@ -95,6 +95,7 @@ ViewStyle::ViewStyle(const ViewStyle &source) {  	caretcolour.desired = source.caretcolour.desired;  	showCaretLineBackground = source.showCaretLineBackground;  	caretLineBackground.desired = source.caretLineBackground.desired; +	caretLineAlpha = source.caretLineAlpha;  	edgecolour.desired = source.edgecolour.desired;  	edgeState = source.edgeState;  	caretWidth = source.caretWidth; @@ -157,6 +158,7 @@ void ViewStyle::Init() {  	caretcolour.desired = ColourDesired(0, 0, 0);  	showCaretLineBackground = false;  	caretLineBackground.desired = ColourDesired(0xff, 0xff, 0); +	caretLineAlpha = SC_ALPHA_NOALPHA;  	edgecolour.desired = ColourDesired(0xc0, 0xc0, 0xc0);  	edgeState = EDGE_NONE;  	caretWidth = 1; diff --git a/src/ViewStyle.h b/src/ViewStyle.h index d06c02002..90d50b1fb 100644 --- a/src/ViewStyle.h +++ b/src/ViewStyle.h @@ -85,6 +85,7 @@ public:  	ColourPair caretcolour;  	bool showCaretLineBackground;  	ColourPair caretLineBackground; +	int caretLineAlpha;  	ColourPair edgecolour;  	int edgeState;  	int caretWidth; | 
