aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2015-09-26 11:37:09 +1000
committerNeil <nyamatongwe@gmail.com>2015-09-26 11:37:09 +1000
commitc89e08dc9ba69358ade935aa10f180ecbe168f52 (patch)
treea6334a533aceb2fbe547d6a29c684ee043a374f2
parenta573e3a1253f2affd7d5cc4b6b782ae7b0aa8143 (diff)
downloadscintilla-mirror-c89e08dc9ba69358ade935aa10f180ecbe168f52.tar.gz
Centre whitespace dot when dot is larger than 1 pixel.
-rw-r--r--doc/ScintillaHistory.html3
-rw-r--r--src/EditView.cxx3
2 files changed, 5 insertions, 1 deletions
diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html
index de0656980..2718bfbbe 100644
--- a/doc/ScintillaHistory.html
+++ b/doc/ScintillaHistory.html
@@ -497,6 +497,9 @@
Whitespace may be made visible just in indentation.
</li>
<li>
+ Whitespace dots are centred when larger than 1 pixel.
+ </li>
+ <li>
The Scintilla framework on Cocoa now contains version numbers.
</li>
<li>
diff --git a/src/EditView.cxx b/src/EditView.cxx
index 58e6be623..f89e4e141 100644
--- a/src/EditView.cxx
+++ b/src/EditView.cxx
@@ -1575,7 +1575,8 @@ void EditView::DrawForeground(Surface *surface, const EditModel &model, const Vi
rcSegment.bottom);
surface->FillRectangle(rcSpace, textBack);
}
- PRectangle rcDot(xmid + xStart - static_cast<XYPOSITION>(subLineStart),
+ const int halfDotWidth = vsDraw.whitespaceSize / 2;
+ PRectangle rcDot(xmid + xStart - halfDotWidth - static_cast<XYPOSITION>(subLineStart),
rcSegment.top + vsDraw.lineHeight / 2, 0.0f, 0.0f);
rcDot.right = rcDot.left + vsDraw.whitespaceSize;
rcDot.bottom = rcDot.top + vsDraw.whitespaceSize;