Tk Source Code

Check-in [43ba967d]
Login
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to [email protected]
or submit via the online form by Sep 9.

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

Overview
Comment:-lmargincolor tag configuration option: implementation slightly optimized since Tk_Fill3DRectangle is robust with respect to negative widths
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | tip-443
Files: files | file ages | folders
SHA1: 43ba967d40489c2547a41766bc3d8f65eb86b995
User & Date: fvogel 2016-02-11 13:17:51
Context
2016-03-01
17:36
trunk merged to branch tip-443 check-in: d89f2e1b user: fvogel tags: tip-443
2016-02-11
13:17
-lmargincolor tag configuration option: implementation slightly optimized since Tk_Fill3DRectangle is robust with respect to negative widths check-in: 43ba967d user: fvogel tags: tip-443
10:41
Fixed typo in comment (introduced by error in [6a21622c7e]) check-in: 623c5d28 user: fvogel tags: tip-443
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to generic/tkTextDisp.c.

2475
2476
2477
2478
2479
2480
2481
2482
2483
2484

2485
2486
2487
2488
2489
2490
2491
2492
    Tk_Fill3DRectangle(textPtr->tkwin, pixmap, textPtr->border, 0, y,
	    Tk_Width(textPtr->tkwin), dlPtr->height, 0, TK_RELIEF_FLAT);

    /*
     * Second, draw the background color of the left and right margins.
     */
    if (dlPtr->lMarginColor != NULL) {
        int x = dlPtr->lMarginWidth + dInfoPtr->x - dInfoPtr->curXPixelOffset;

        Tk_Fill3DRectangle(textPtr->tkwin, pixmap, dlPtr->lMarginColor, 0, y,

                (x>0?x:0), dlPtr->height, 0, TK_RELIEF_FLAT);
    }
    if (dlPtr->rMarginColor != NULL) {
        Tk_Fill3DRectangle(textPtr->tkwin, pixmap, dlPtr->rMarginColor,
                dInfoPtr->maxX - dlPtr->rMarginWidth + dInfoPtr->curXPixelOffset,
                y, dlPtr->rMarginWidth, dlPtr->height, 0, TK_RELIEF_FLAT);
    }







<
<

>
|







2475
2476
2477
2478
2479
2480
2481


2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
    Tk_Fill3DRectangle(textPtr->tkwin, pixmap, textPtr->border, 0, y,
	    Tk_Width(textPtr->tkwin), dlPtr->height, 0, TK_RELIEF_FLAT);

    /*
     * Second, draw the background color of the left and right margins.
     */
    if (dlPtr->lMarginColor != NULL) {


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