summaryrefslogtreecommitdiffstats
path: root/generic/tkTextDisp.c
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)
commita3505eef032e0d98ab5e3d7883733b7929ebadc0 (patch)
treefa8f4b6b28640f10f11564134855eca0dfc1b71d /generic/tkTextDisp.c
parentc03dab33c00ad6430ebbcc1d4d795ad3f6452b82 (diff)
downloadtk-a3505eef032e0d98ab5e3d7883733b7929ebadc0.zip
tk-a3505eef032e0d98ab5e3d7883733b7929ebadc0.tar.gz
tk-a3505eef032e0d98ab5e3d7883733b7929ebadc0.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/tkTextDisp.c')
-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);