diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Editor.cxx | 13 | ||||
-rw-r--r-- | src/Indicator.cxx | 1 | ||||
-rw-r--r-- | src/Indicator.h | 1 |
3 files changed, 14 insertions, 1 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx index 44c80451b..7ad889c23 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -7518,6 +7518,19 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) { case SCI_INDICGETOUTLINEALPHA: return (wParam <= INDICATOR_MAX) ? vs.indicators[wParam].outlineAlpha : 0; + case SCI_INDICSETSTROKEWIDTH: + if (wParam <= INDICATOR_MAX && lParam >= 0 && lParam <= 1000) { + vs.indicators[wParam].strokeWidth = lParam / 100.0f; + InvalidateStyleRedraw(); + } + break; + + case SCI_INDICGETSTROKEWIDTH: + if (wParam <= INDICATOR_MAX) { + return std::lround(vs.indicators[wParam].strokeWidth * 100); + } + break; + case SCI_SETINDICATORCURRENT: pdoc->DecorationSetCurrentIndicator(static_cast<int>(wParam)); break; diff --git a/src/Indicator.cxx b/src/Indicator.cxx index 93bf68ed0..1ebc18b7f 100644 --- a/src/Indicator.cxx +++ b/src/Indicator.cxx @@ -36,7 +36,6 @@ void Indicator::Draw(Surface *surface, const PRectangle &rc, const PRectangle &r const int pixelDivisions = surface->PixelDivisions(); - const XYPOSITION strokeWidth = 1.0f; const XYPOSITION halfWidth = strokeWidth / 2.0f; const PRectangle rcAligned(PixelAlignOutside(rc, pixelDivisions)); diff --git a/src/Indicator.h b/src/Indicator.h index 669d9a2d8..89cf1cdc5 100644 --- a/src/Indicator.h +++ b/src/Indicator.h @@ -33,6 +33,7 @@ public: int fillAlpha; int outlineAlpha; int attributes; + XYPOSITION strokeWidth = 1.0f; Indicator() noexcept : under(false), fillAlpha(30), outlineAlpha(50), attributes(0) { } Indicator(int style_, ColourDesired fore_=ColourDesired(0,0,0), bool under_=false, int fillAlpha_=30, int outlineAlpha_=50) noexcept : |