Tk Source Code

Check-in [6523c540]
Login
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to tclconference@googlegroups.com
or submit via the online form by Sep 9.

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Bugfix [6e16952a49]: Issue (1) fixed.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | revised_text | tip-466
Files: files | file ages | folders
SHA3-256:6523c540ea764d57619e5d1e12452b6e6061422b64a72f7307c57ed10650db4e
User & Date: gcramer 2018-10-30 13:51:30
References
2018-10-30
21:34 Ticket [6e16952a] revised_text insertion cursor and -padx issues status still Open with 3 other changes artifact: 24aae96c user: fvogel
Context
2018-11-02
18:43
Show cursor in any case, even if padx=0. check-in: b5d2bf70 user: gcramer tags: revised_text, tip-466
2018-10-30
13:51
Bugfix [6e16952a49]: Issue (1) fixed. check-in: 6523c540 user: gcramer tags: revised_text, tip-466
12:45
Bugfix [6e16952a49]: Issue (2) fixed, cursor will be visible even if -padx is zero. check-in: 08ec7aed user: gcramer tags: revised_text, tip-466
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to generic/tkTextDisp.c.

6341
6342
6343
6344
6345
6346
6347
6348

6349
6350
6351
6352
6353
6354
6355
6356
6357
6358
6359
6360
     * Third, draw the background color of the left and right margins.
     */

    sValuePtr = dlPtr->firstCharChunkPtr->stylePtr->sValuePtr;
    rMargin = (sValuePtr->wrapMode == TEXT_WRAPMODE_NONE) ? 0 : sValuePtr->rMargin;
    xIndent = GetLeftLineMargin(dlPtr, sValuePtr);

    if (sValuePtr->lMarginColor != NULL) {

        Tk_Fill3DRectangle(textPtr->tkwin, pixmap, sValuePtr->lMarginColor, 0, 0,
                xIndent + dInfoPtr->x - dInfoPtr->curXPixelOffset,
                dlPtr->height, 0, TK_RELIEF_FLAT);
    }
    if (sValuePtr->rMarginColor != NULL) {
        Tk_Fill3DRectangle(textPtr->tkwin, pixmap, sValuePtr->rMarginColor,
                dInfoPtr->maxX - rMargin + dInfoPtr->curXPixelOffset,
                0, rMargin, dlPtr->height, 0, TK_RELIEF_FLAT);
    }

    yBase = dlPtr->spaceAbove;
    height = dlPtr->height - dlPtr->spaceAbove - dlPtr->spaceBelow;







|
>
|
|
|

|







6341
6342
6343
6344
6345
6346
6347
6348
6349
6350
6351
6352
6353
6354
6355
6356
6357
6358
6359
6360
6361
     * Third, draw the background color of the left and right margins.
     */

    sValuePtr = dlPtr->firstCharChunkPtr->stylePtr->sValuePtr;
    rMargin = (sValuePtr->wrapMode == TEXT_WRAPMODE_NONE) ? 0 : sValuePtr->rMargin;
    xIndent = GetLeftLineMargin(dlPtr, sValuePtr);

    if (xIndent > 0 && sValuePtr->lMarginColor != NULL) {
	int pad = textPtr->padX ? textPtr->padX + 1 : 0;
        Tk_Fill3DRectangle(textPtr->tkwin, pixmap, sValuePtr->lMarginColor, textPtr->padX, 0,
                xIndent + dInfoPtr->x - dInfoPtr->curXPixelOffset - pad,
		dlPtr->height, 0, TK_RELIEF_FLAT);
    }
    if (rMargin > 0 && sValuePtr->rMarginColor != NULL) {
        Tk_Fill3DRectangle(textPtr->tkwin, pixmap, sValuePtr->rMarginColor,
                dInfoPtr->maxX - rMargin + dInfoPtr->curXPixelOffset,
                0, rMargin, dlPtr->height, 0, TK_RELIEF_FLAT);
    }

    yBase = dlPtr->spaceAbove;
    height = dlPtr->height - dlPtr->spaceAbove - dlPtr->spaceBelow;