aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/LineMarker.cxx
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2022-07-31 22:21:57 +1000
committerNeil <nyamatongwe@gmail.com>2022-07-31 22:21:57 +1000
commitd38429108f2035d9fab0919271f6715cd1b7eda6 (patch)
tree014b3bf217785e26e4c8db514fedf380d3bb007a /src/LineMarker.cxx
parent926cb6f7d228b347db16a45e1f2632da475da1f0 (diff)
downloadscintilla-mirror-d38429108f2035d9fab0919271f6715cd1b7eda6.tar.gz
Add SC_MARK_BAR marker and INDIC_POINT_TOP indicator which are useful for change
history. Tweak size of INDIC_POINT and INDIC_POINTCHARACTER. Let translucency of INDIC_COMPOSITIONTHICK be adjusted.
Diffstat (limited to 'src/LineMarker.cxx')
-rw-r--r--src/LineMarker.cxx31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/LineMarker.cxx b/src/LineMarker.cxx
index df8c3d55a..9794f523c 100644
--- a/src/LineMarker.cxx
+++ b/src/LineMarker.cxx
@@ -514,6 +514,37 @@ void LineMarker::Draw(Surface *surface, const PRectangle &rcWhole, const Font *f
}
break;
+ case MarkerSymbol::Bar: {
+ PRectangle rcBar = rcWhole;
+ const XYPOSITION widthBar = std::floor(rcWhole.Width() / 3.0);
+ rcBar.left = centreX - std::floor(widthBar / 2.0);
+ rcBar.right = rcBar.left + widthBar;
+ surface->SetClip(rcWhole);
+ switch (part) {
+ case LineMarker::FoldPart::headWithTail:
+ surface->RectangleDraw(rcBar, FillStroke(back, fore, strokeWidth));
+ break;
+ case LineMarker::FoldPart::head:
+ rcBar.bottom += 5;
+ surface->RectangleDraw(rcBar, FillStroke(back, fore, strokeWidth));
+ break;
+ case LineMarker::FoldPart::tail:
+ rcBar.top -= 5;
+ surface->RectangleDraw(rcBar, FillStroke(back, fore, strokeWidth));
+ break;
+ case LineMarker::FoldPart::body:
+ rcBar.top -= 5;
+ rcBar.bottom += 5;
+ surface->RectangleDraw(rcBar, FillStroke(back, fore, strokeWidth));
+ break;
+ default:
+ break;
+ }
+ surface->PopClip();
+ }
+ break;
+
+
case MarkerSymbol::Bookmark: {
const XYPOSITION halfHeight = std::floor(minDim / 3);
Point pts[] = {