aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2014-01-18 10:41:22 +1100
committerNeil <nyamatongwe@gmail.com>2014-01-18 10:41:22 +1100
commita285d5a30827d68ec10d6333907cdf905ee8507c (patch)
tree2fed5947c4e909abd4c8d208f145e1699b98e4e6 /src
parente021c0d7a7cabfd586b3563ca170d01075aa8ceb (diff)
downloadscintilla-mirror-a285d5a30827d68ec10d6333907cdf905ee8507c.tar.gz
For SC_MARK_ARROWS, scale the arrows to fit the line height.
Avoid drawing one arm of each arrow longer than the other on Cocoa. The weight of the strokes is more uniform on Windows/Direct2D and Cairo.
Diffstat (limited to 'src')
-rw-r--r--src/LineMarker.cxx10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/LineMarker.cxx b/src/LineMarker.cxx
index 94513f5d0..7e08e86d2 100644
--- a/src/LineMarker.cxx
+++ b/src/LineMarker.cxx
@@ -355,10 +355,12 @@ void LineMarker::Draw(Surface *surface, PRectangle &rcWhole, Font &fontForCharac
} else if (markType == SC_MARK_ARROWS) {
surface->PenColour(fore);
int right = centreX - 2;
- for (int b=0; b<3; b++) {
- surface->MoveTo(right - 4, centreY - 4);
- surface->LineTo(right, centreY);
- surface->LineTo(right - 5, centreY + 5);
+ const int armLength = dimOn2 - 1;
+ for (int b = 0; b<3; b++) {
+ surface->MoveTo(right, centreY);
+ surface->LineTo(right - armLength, centreY - armLength);
+ surface->MoveTo(right, centreY);
+ surface->LineTo(right - armLength, centreY + armLength);
right += 4;
}
} else if (markType == SC_MARK_SHORTARROW) {