diff options
Diffstat (limited to 'src/Editor.cxx')
-rw-r--r-- | src/Editor.cxx | 15 |
1 files changed, 14 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 |