aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Editor.cxx10
-rw-r--r--src/Indicator.cxx2
-rw-r--r--src/Indicator.h3
3 files changed, 13 insertions, 2 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx
index 8910a5b53..c4c3a8179 100644
--- a/src/Editor.cxx
+++ b/src/Editor.cxx
@@ -7229,6 +7229,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 >=0 && lParam <= 100) {
+ vs.indicators[wParam].fillAlpha = lParam;
+ InvalidateStyleRedraw();
+ }
+ break;
+
+ case SCI_INDICGETALPHA:
+ return (wParam <= INDIC_MAX) ? vs.indicators[wParam].fillAlpha : 0;
+
case SCI_SETINDICATORCURRENT:
pdoc->decorations.SetCurrentIndicator(wParam);
break;
diff --git a/src/Indicator.cxx b/src/Indicator.cxx
index 139e2b0ea..da9531224 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, 30, fore.allocated, 50, 0);
+ surface->AlphaRectangle(rcBox, 1, fore.allocated, fillAlpha, fore.allocated, 50, 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 2081db544..42b56f07e 100644
--- a/src/Indicator.h
+++ b/src/Indicator.h
@@ -19,7 +19,8 @@ public:
int style;
bool under;
ColourPair fore;
- Indicator() : style(INDIC_PLAIN), under(false), fore(ColourDesired(0,0,0)) {
+ int fillAlpha;
+ Indicator() : style(INDIC_PLAIN), under(false), fore(ColourDesired(0,0,0)), fillAlpha(30) {
}
void Draw(Surface *surface, const PRectangle &rc, const PRectangle &rcLine);
};