aboutsummaryrefslogtreecommitdiff
path: root/src/scintilla_backports/6134_0253f113f223.patch
blob: aa1ffe616b94edc25a61b5a7e5e396bc3556d36e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# HG changeset patch
# User Neil <nyamatongwe@gmail.com>
# Date 1489704595 -39600
# Node ID 0253f113f22359c009f415099cf635b2637def1e
# Parent  30f1573f17ace82fd1adba69e733c4726f68e867
Round left and right sides of fold text box to ensure within the allocation.

diff -r 30f1573f17ac -r 0253f113f223 src/EditView.cxx
--- a/src/EditView.cxx	Thu Mar 16 13:40:19 2017 +1100
+++ b/src/EditView.cxx	Fri Mar 17 09:49:55 2017 +1100
@@ -1133,14 +1133,17 @@
 	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));
 		}
 	}