aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/EditView.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/EditView.cxx')
-rw-r--r--src/EditView.cxx15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/EditView.cxx b/src/EditView.cxx
index b2714f7ac..c1722a047 100644
--- a/src/EditView.cxx
+++ b/src/EditView.cxx
@@ -271,10 +271,10 @@ static const char *ControlCharacterString(unsigned char ch) noexcept {
}
}
-static void DrawTabArrow(Surface *surface, PRectangle rcTab, int ymid, const ViewStyle &vsDraw,
- ColourAlpha textFore, XYPOSITION widthStroke) {
+static void DrawTabArrow(Surface *surface, PRectangle rcTab, int ymid,
+ const ViewStyle &vsDraw, Stroke stroke) {
- const XYPOSITION halfWidth = widthStroke / 2.0f;
+ const XYPOSITION halfWidth = stroke.width / 2.0;
const XYPOSITION leftStroke = std::round(std::min(rcTab.left + 2, rcTab.right - 1)) + halfWidth;
const XYPOSITION rightStroke = std::max(leftStroke, std::round(rcTab.right) - 1.0f - halfWidth);
@@ -282,8 +282,7 @@ static void DrawTabArrow(Surface *surface, PRectangle rcTab, int ymid, const Vie
const Point arrowPoint(rightStroke, yMidAligned);
if (rightStroke > leftStroke) {
// When not enough room, don't draw the arrow shaft
- surface->LineDraw(Point(leftStroke, yMidAligned), arrowPoint,
- Stroke(textFore, widthStroke));
+ surface->LineDraw(Point(leftStroke, yMidAligned), arrowPoint, stroke);
}
// Draw the arrow head if needed
@@ -299,7 +298,7 @@ static void DrawTabArrow(Surface *surface, PRectangle rcTab, int ymid, const Vie
arrowPoint,
Point(xhead, yMidAligned + ydiff)
};
- surface->PolyLine(ptsHead, std::size(ptsHead), Stroke(textFore, widthStroke));
+ surface->PolyLine(ptsHead, std::size(ptsHead), stroke);
}
}
@@ -1981,9 +1980,9 @@ void EditView::DrawForeground(Surface *surface, const EditModel &model, const Vi
rcSegment.right - 1, rcSegment.bottom - vsDraw.maxDescent);
const int segmentTop = static_cast<int>(rcSegment.top + vsDraw.lineHeight / 2);
if (!customDrawTabArrow)
- DrawTabArrow(surface, rcTab, segmentTop, vsDraw, textFore, 1.0f);
+ DrawTabArrow(surface, rcTab, segmentTop, vsDraw, Stroke(textFore, 1.0f));
else
- customDrawTabArrow(surface, rcTab, segmentTop);
+ customDrawTabArrow(surface, rcTab, segmentTop, vsDraw, Stroke(textFore, 1.0f));
}
}
} else {