summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfvogelnew1@free.fr <fvogel>2016-02-11 13:17:51 (GMT)
committerfvogelnew1@free.fr <fvogel>2016-02-11 13:17:51 (GMT)
commit7fd5ea1d33bb0682c840eedcef9a2048f801e748 (patch)
treedd6b16fd5f3e5f8dfbfbc3fda8fa93e25e059697
parentb640622b25fe5c30e91f224bb3ae74e2e853b9b3 (diff)
downloadtk-tagoptions.zip
tk-tagoptions.tar.gz
tk-tagoptions.tar.bz2
-lmargincolor tag configuration option: implementation slightly optimized since Tk_Fill3DRectangle is robust with respect to negative widthstagoptions
-rw-r--r--generic/tkTextDisp.c5
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,