diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/EditView.cxx | 3 | ||||
-rw-r--r-- | src/Indicator.cxx | 14 |
2 files changed, 9 insertions, 8 deletions
diff --git a/src/EditView.cxx b/src/EditView.cxx index 2290cf8a6..86e59b4dc 100644 --- a/src/EditView.cxx +++ b/src/EditView.cxx @@ -1244,7 +1244,8 @@ static void DrawIndicator(int indicNum, Sci::Position startPos, Sci::Position en const XYPOSITION left = ll->XInLine(startPos) + horizontalOffset; const XYPOSITION right = ll->XInLine(endPos) + horizontalOffset; - const PRectangle rcIndic(left, rcLine.top + vsDraw.maxAscent, right, rcLine.top + vsDraw.maxAscent + 3); + const PRectangle rcIndic(left, rcLine.top + vsDraw.maxAscent, right, + std::max(rcLine.top + vsDraw.maxAscent + 3, rcLine.bottom)); if (bidiEnabled) { ScreenLine screenLine(ll, subLine, vsDraw, rcLine.right - xStart, tabWidthMinimumPixels); diff --git a/src/Indicator.cxx b/src/Indicator.cxx index cb7d5deba..5c15caeb6 100644 --- a/src/Indicator.cxx +++ b/src/Indicator.cxx @@ -265,15 +265,15 @@ void Indicator::Draw(Surface *surface, const PRectangle &rc, const PRectangle &r case IndicatorStyle::Point: case IndicatorStyle::PointCharacter: if (rcCharacter.Width() >= 0.1) { - const XYPOSITION pixelHeight = std::floor(rc.Height() - 1.0f); // 1 pixel onto next line if multiphase + const XYPOSITION pixelHeight = std::floor(rc.Height()); // 1 pixel onto next line if multiphase const XYPOSITION x = (sacDraw.style == IndicatorStyle::Point) ? (rcCharacter.left) : ((rcCharacter.right + rcCharacter.left) / 2); // 0.5f is to hit midpoint of pixels: const XYPOSITION ix = std::round(x) + 0.5f; - const XYPOSITION iy = std::floor(rc.top) + 0.5f; + const XYPOSITION iy = std::ceil(rc.bottom) + 0.5f; const Point pts[] = { - Point(ix - pixelHeight, iy + pixelHeight), // Left - Point(ix + pixelHeight, iy + pixelHeight), // Right - Point(ix, iy) // Top + Point(ix - pixelHeight, iy), // Left + Point(ix + pixelHeight, iy), // Right + Point(ix, iy - pixelHeight) // Top }; surface->Polygon(pts, std::size(pts), FillStroke(sacDraw.fore)); } @@ -281,11 +281,11 @@ void Indicator::Draw(Surface *surface, const PRectangle &rc, const PRectangle &r case IndicatorStyle::PointTop: if (rcCharacter.Width() >= 0.1) { - const XYPOSITION pixelHeight = std::floor(rc.Height() - 1.0f); // 1 pixel onto previous line if multiphase + const XYPOSITION pixelHeight = std::floor(rc.Height()); // 1 pixel onto previous line if multiphase const XYPOSITION x = rcCharacter.left; // 0.5f is to hit midpoint of pixels: const XYPOSITION ix = std::round(x) + 0.5f; - const XYPOSITION iy = std::floor(rcLine.top) + 0.5f; + const XYPOSITION iy = std::floor(rcLine.top) - 0.5f; const Point pts[] = { Point(ix - pixelHeight, iy), // Left Point(ix + pixelHeight, iy), // Right |