summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2016-12-23 22:16:42 (GMT)
committerfvogel <fvogelnew1@free.fr>2016-12-23 22:16:42 (GMT)
commit0316d840d0dd2798e1e345dd5a565c3c83ccbae3 (patch)
treefa8f4b6b28640f10f11564134855eca0dfc1b71d /generic
parentf816c46ea5a7eefb2cd880dedfa9e3b344a988f3 (diff)
downloadtk-0316d840d0dd2798e1e345dd5a565c3c83ccbae3.zip
tk-0316d840d0dd2798e1e345dd5a565c3c83ccbae3.tar.gz
tk-0316d840d0dd2798e1e345dd5a565c3c83ccbae3.tar.bz2
On Windows with TK_LAYOUT_WITH_BASE_CHUNKS and TK_DRAW_IN_CONTEXT being both defined for testing purposes, rendering of the text was incorrect because some chunks were superimposed (this was only a display issue, x and width of all chunks were already correct). Fix this.
Diffstat (limited to 'generic')
-rw-r--r--generic/tkTextDisp.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/generic/tkTextDisp.c b/generic/tkTextDisp.c
index 4b7b0db..f07650f 100644
--- a/generic/tkTextDisp.c
+++ b/generic/tkTextDisp.c
@@ -7933,7 +7933,6 @@ CharDisplayProc(
#if TK_DRAW_IN_CONTEXT
int start = ciPtr->baseOffset + offsetBytes;
int len = ciPtr->numBytes - offsetBytes;
- int xDisplacement = x - chunkPtr->x;
if ((len > 0) && (string[start + len - 1] == '\t')) {
len--;
@@ -7943,14 +7942,12 @@ CharDisplayProc(
}
TkpDrawCharsInContext(display, dst, stylePtr->fgGC, sValuePtr->tkfont,
- string, numBytes, start, len,
- ciPtr->baseChunkPtr->x + xDisplacement,
+ string, numBytes, start, len, offsetX,
y + baseline - sValuePtr->offset);
if (sValuePtr->underline) {
TkUnderlineCharsInContext(display, dst, stylePtr->ulGC,
- sValuePtr->tkfont, string, numBytes,
- ciPtr->baseChunkPtr->x + xDisplacement,
+ sValuePtr->tkfont, string, numBytes, offsetX,
y + baseline - sValuePtr->offset,
start, start+len);
}
@@ -7959,8 +7956,7 @@ CharDisplayProc(
Tk_GetFontMetrics(sValuePtr->tkfont, &fm);
TkUnderlineCharsInContext(display, dst, stylePtr->ovGC,
- sValuePtr->tkfont, string, numBytes,
- ciPtr->baseChunkPtr->x + xDisplacement,
+ sValuePtr->tkfont, string, numBytes, offsetX,
y + baseline - sValuePtr->offset
- fm.descent - (fm.ascent * 3) / 10,
start, start+len);