aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--doc/ScintillaHistory.html3
-rw-r--r--src/EditView.cxx3
-rw-r--r--src/Indicator.cxx14
3 files changed, 12 insertions, 8 deletions
diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html
index 2224ca420..c14fcc59a 100644
--- a/doc/ScintillaHistory.html
+++ b/doc/ScintillaHistory.html
@@ -595,6 +595,9 @@
may appear and then disappear depending on which lines were drawn.
</li>
<li>
+ Enlarge point and point top indicators and scale to be larger with larger text.
+ </li>
+ <li>
On Win32 implement horizontal scrolling mouse wheel.
<a href="https://sourceforge.net/p/scintilla/feature-requests/1450/">Feature #1450</a>.
</li>
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