From 1fe173f0ae8e03bea2fcb192a107a87aa2970d9c Mon Sep 17 00:00:00 2001 From: Neil Date: Fri, 17 Mar 2017 09:49:55 +1100 Subject: Round left and right sides of fold text box to ensure within the allocation. --- src/EditView.cxx | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/EditView.cxx b/src/EditView.cxx index 33359ca97..b9264ab34 100644 --- a/src/EditView.cxx +++ b/src/EditView.cxx @@ -1133,14 +1133,17 @@ void EditView::DrawFoldDisplayText(Surface *surface, const EditModel &model, con if (phase & drawIndicatorsFore) { if (model.foldDisplayTextStyle == SC_FOLDDISPLAYTEXT_BOXED) { surface->PenColour(textFore); - surface->MoveTo(static_cast(rcSegment.left), static_cast(rcSegment.top)); - surface->LineTo(static_cast(rcSegment.left), static_cast(rcSegment.bottom)); - surface->MoveTo(static_cast(rcSegment.right), static_cast(rcSegment.top)); - surface->LineTo(static_cast(rcSegment.right), static_cast(rcSegment.bottom)); - surface->MoveTo(static_cast(rcSegment.left), static_cast(rcSegment.top)); - surface->LineTo(static_cast(rcSegment.right), static_cast(rcSegment.top)); - surface->MoveTo(static_cast(rcSegment.left), static_cast(rcSegment.bottom - 1)); - surface->LineTo(static_cast(rcSegment.right), static_cast(rcSegment.bottom - 1)); + PRectangle rcBox = rcSegment; + rcBox.left = static_cast(RoundXYPosition(rcSegment.left)); + rcBox.right = static_cast(RoundXYPosition(rcSegment.right)); + surface->MoveTo(static_cast(rcBox.left), static_cast(rcBox.top)); + surface->LineTo(static_cast(rcBox.left), static_cast(rcBox.bottom)); + surface->MoveTo(static_cast(rcBox.right), static_cast(rcBox.top)); + surface->LineTo(static_cast(rcBox.right), static_cast(rcBox.bottom)); + surface->MoveTo(static_cast(rcBox.left), static_cast(rcBox.top)); + surface->LineTo(static_cast(rcBox.right), static_cast(rcBox.top)); + surface->MoveTo(static_cast(rcBox.left), static_cast(rcBox.bottom - 1)); + surface->LineTo(static_cast(rcBox.right), static_cast(rcBox.bottom - 1)); } } -- cgit v1.2.3