diff options
| author | Neil <nyamatongwe@gmail.com> | 2017-03-17 09:49:55 +1100 | 
|---|---|---|
| committer | Neil <nyamatongwe@gmail.com> | 2017-03-17 09:49:55 +1100 | 
| commit | 1fe173f0ae8e03bea2fcb192a107a87aa2970d9c (patch) | |
| tree | fe67b00cecbeb9add83ffdf9c53dbf1a7ed69b62 | |
| parent | c8be46d4bf7b0b386223188eb9c33a8f39746619 (diff) | |
| download | scintilla-mirror-1fe173f0ae8e03bea2fcb192a107a87aa2970d9c.tar.gz | |
Round left and right sides of fold text box to ensure within the allocation.
| -rw-r--r-- | src/EditView.cxx | 19 | 
1 files changed, 11 insertions, 8 deletions
| 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<int>(rcSegment.left), static_cast<int>(rcSegment.top)); -			surface->LineTo(static_cast<int>(rcSegment.left), static_cast<int>(rcSegment.bottom)); -			surface->MoveTo(static_cast<int>(rcSegment.right), static_cast<int>(rcSegment.top)); -			surface->LineTo(static_cast<int>(rcSegment.right), static_cast<int>(rcSegment.bottom)); -			surface->MoveTo(static_cast<int>(rcSegment.left), static_cast<int>(rcSegment.top)); -			surface->LineTo(static_cast<int>(rcSegment.right), static_cast<int>(rcSegment.top)); -			surface->MoveTo(static_cast<int>(rcSegment.left), static_cast<int>(rcSegment.bottom - 1)); -			surface->LineTo(static_cast<int>(rcSegment.right), static_cast<int>(rcSegment.bottom - 1)); +			PRectangle rcBox = rcSegment; +			rcBox.left = static_cast<XYPOSITION>(RoundXYPosition(rcSegment.left)); +			rcBox.right = static_cast<XYPOSITION>(RoundXYPosition(rcSegment.right)); +			surface->MoveTo(static_cast<int>(rcBox.left), static_cast<int>(rcBox.top)); +			surface->LineTo(static_cast<int>(rcBox.left), static_cast<int>(rcBox.bottom)); +			surface->MoveTo(static_cast<int>(rcBox.right), static_cast<int>(rcBox.top)); +			surface->LineTo(static_cast<int>(rcBox.right), static_cast<int>(rcBox.bottom)); +			surface->MoveTo(static_cast<int>(rcBox.left), static_cast<int>(rcBox.top)); +			surface->LineTo(static_cast<int>(rcBox.right), static_cast<int>(rcBox.top)); +			surface->MoveTo(static_cast<int>(rcBox.left), static_cast<int>(rcBox.bottom - 1)); +			surface->LineTo(static_cast<int>(rcBox.right), static_cast<int>(rcBox.bottom - 1));  		}  	} | 
