diff options
author | Marko Njezic <unknown> | 2012-02-17 23:59:20 +0100 |
---|---|---|
committer | Marko Njezic <unknown> | 2012-02-17 23:59:20 +0100 |
commit | 3b553666696950d50af766a3e9ea744327b80304 (patch) | |
tree | 236d0d5af5211d660bcc74fb14528655ac60a753 /src | |
parent | e820e6b25cf5e213c15078b695972492a9e009a1 (diff) | |
download | scintilla-mirror-3b553666696950d50af766a3e9ea744327b80304.tar.gz |
Draw markers horizontally off center only on textual margins. Bug #3488696.
Diffstat (limited to 'src')
-rw-r--r-- | src/Editor.cxx | 2 | ||||
-rw-r--r-- | src/LineMarker.cxx | 6 | ||||
-rw-r--r-- | src/LineMarker.h | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx index e9b66fcce..a6212ab1f 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -1979,7 +1979,7 @@ void Editor::PaintSelMargin(Surface *surfWindow, PRectangle &rc) { tFold = LineMarker::tail; } } - vs.markers[markBit].Draw(surface, rcMarker, vs.styles[STYLE_LINENUMBER].font, tFold); + vs.markers[markBit].Draw(surface, rcMarker, vs.styles[STYLE_LINENUMBER].font, tFold, vs.ms[margin].style); } marks >>= 1; } diff --git a/src/LineMarker.cxx b/src/LineMarker.cxx index de9968fab..e10e69142 100644 --- a/src/LineMarker.cxx +++ b/src/LineMarker.cxx @@ -68,7 +68,7 @@ static void DrawMinus(Surface *surface, int centreX, int centreY, int armSize, C surface->FillRectangle(rcH, fore); } -void LineMarker::Draw(Surface *surface, PRectangle &rcWhole, Font &fontForCharacter, typeOfFold tFold) { +void LineMarker::Draw(Surface *surface, PRectangle &rcWhole, Font &fontForCharacter, typeOfFold tFold, int marginStyle) { ColourDesired head = back; ColourDesired body = back; ColourDesired tail = back; @@ -112,8 +112,8 @@ void LineMarker::Draw(Surface *surface, PRectangle &rcWhole, Font &fontForCharac int dimOn4 = minDim / 4; int blobSize = dimOn2-1; int armSize = dimOn2-2; - if (rc.Width() > (rc.Height() * 2)) { - // Wide column is line number so move to left to try to avoid overlapping number + if (marginStyle == SC_MARGIN_NUMBER || marginStyle == SC_MARGIN_TEXT || marginStyle == SC_MARGIN_RTEXT) { + // On textual margins move marker to the left to try to avoid overlapping the text centreX = rc.left + dimOn2 + 1; } if (markType == SC_MARK_ROUNDRECT) { diff --git a/src/LineMarker.h b/src/LineMarker.h index ccf410414..a501ed6a1 100644 --- a/src/LineMarker.h +++ b/src/LineMarker.h @@ -65,7 +65,7 @@ public: void SetXPM(const char *textForm); void SetXPM(const char *const *linesForm); void SetRGBAImage(Point sizeRGBAImage, const unsigned char *pixelsRGBAImage); - void Draw(Surface *surface, PRectangle &rc, Font &fontForCharacter, typeOfFold tFold); + void Draw(Surface *surface, PRectangle &rc, Font &fontForCharacter, typeOfFold tFold, int marginStyle); }; #ifdef SCI_NAMESPACE |