diff options
author | fvogel <fvogelnew1@free.fr> | 2016-02-11 13:17:51 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2016-02-11 13:17:51 (GMT) |
commit | 2d1dee7c0fdf51a57ac71ed493aa92e278a7720e (patch) | |
tree | dd6b16fd5f3e5f8dfbfbc3fda8fa93e25e059697 /generic/tkTextDisp.c | |
parent | 0fe18b82571d24300bc235e6c37013742ee3b778 (diff) | |
download | tk-2d1dee7c0fdf51a57ac71ed493aa92e278a7720e.zip tk-2d1dee7c0fdf51a57ac71ed493aa92e278a7720e.tar.gz tk-2d1dee7c0fdf51a57ac71ed493aa92e278a7720e.tar.bz2 |
-lmargincolor tag configuration option: implementation slightly optimized since Tk_Fill3DRectangle is robust with respect to negative widths
Diffstat (limited to 'generic/tkTextDisp.c')
-rw-r--r-- | generic/tkTextDisp.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/generic/tkTextDisp.c b/generic/tkTextDisp.c index c0dc017..f871fc1 100644 --- a/generic/tkTextDisp.c +++ b/generic/tkTextDisp.c @@ -2479,10 +2479,9 @@ DisplayDLine( * 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); + dlPtr->lMarginWidth + dInfoPtr->x - dInfoPtr->curXPixelOffset, + dlPtr->height, 0, TK_RELIEF_FLAT); } if (dlPtr->rMarginColor != NULL) { Tk_Fill3DRectangle(textPtr->tkwin, pixmap, dlPtr->rMarginColor, |