diff options
author | Neil <nyamatongwe@gmail.com> | 2022-10-19 11:55:55 +1100 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2022-10-19 11:55:55 +1100 |
commit | 19a781319ccc6c9de302182e141383ba73403030 (patch) | |
tree | c44cc0e810a1eb4f7fd501d6760f507fd23373aa | |
parent | 7f36ea2269dee71024d037c6ae32488f421f5fc0 (diff) | |
download | scintilla-mirror-19a781319ccc6c9de302182e141383ba73403030.tar.gz |
Draw background colour for EOL annotations with standard and boxed visuals.
-rw-r--r-- | doc/ScintillaHistory.html | 11 | ||||
-rw-r--r-- | src/EditView.cxx | 40 |
2 files changed, 36 insertions, 15 deletions
diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html index d04b2ec3d..5a44b84c5 100644 --- a/doc/ScintillaHistory.html +++ b/doc/ScintillaHistory.html @@ -578,6 +578,17 @@ </table> <h2>Releases</h2> <h3> + <a href="https://www.scintilla.org/scintilla532.zip">Release 5.3.2</a> + </h3> + <ul> + <li> + Released 12 October 2022. + </li> + <li> + Draw background colour for EOL annotations with standard and boxed visuals. + </li> + </ul> + <h3> <a href="https://www.scintilla.org/scintilla531.zip">Release 5.3.1</a> </h3> <ul> diff --git a/src/EditView.cxx b/src/EditView.cxx index b25d83618..29569a00b 100644 --- a/src/EditView.cxx +++ b/src/EditView.cxx @@ -1571,24 +1571,34 @@ void EditView::DrawEOLAnnotationText(Surface *surface, const EditModel &model, c // Draw any box or stadium shape if (FlagSet(phase, DrawPhase::indicatorsBack)) { - if (vsDraw.eolAnnotationVisible >= EOLAnnotationVisible::Boxed) { - const PRectangle rcBox = PixelAlign(rcSegment, 1); + const PRectangle rcBox = PixelAlign(rcSegment, 1); - switch (vsDraw.eolAnnotationVisible) { - case EOLAnnotationVisible::Boxed: - surface->RectangleFrame(rcBox, Stroke(textFore)); - break; + switch (vsDraw.eolAnnotationVisible) { + case EOLAnnotationVisible::Standard: + if (phasesDraw != PhasesDraw::One) { + surface->FillRectangle(rcBox, textBack); + } + break; - default: - if (phasesDraw == PhasesDraw::One) { - // Draw an outline around the text - surface->Stadium(rcBox, FillStroke(ColourRGBA(textBack, 0), textFore), ends); - } else { - // Draw with a fill to fill the edges of the shape. - surface->Stadium(rcBox, FillStroke(textBack, textFore), ends); - } - break; + case EOLAnnotationVisible::Boxed: + if (phasesDraw == PhasesDraw::One) { + // Draw a rectangular outline around the text + surface->RectangleFrame(rcBox, textFore); + } else { + // Draw with a fill to fill the edges of the rectangle. + surface->RectangleDraw(rcBox, FillStroke(textBack, textFore)); + } + break; + + default: + if (phasesDraw == PhasesDraw::One) { + // Draw an outline around the text + surface->Stadium(rcBox, FillStroke(ColourRGBA(textBack, 0), textFore), ends); + } else { + // Draw with a fill to fill the edges of the shape. + surface->Stadium(rcBox, FillStroke(textBack, textFore), ends); } + break; } } |