diff options
author | jenglish <jenglish@flightlab.com> | 2006-11-14 22:44:30 (GMT) |
---|---|---|
committer | jenglish <jenglish@flightlab.com> | 2006-11-14 22:44:30 (GMT) |
commit | ec0f31f7586f53663f156175c39235356beb09e6 (patch) | |
tree | ba8cdd6068d38c38423d44703d373c410b53b51b /generic | |
parent | 7655aa17f84f65e0da4755467acff756c7e3a33c (diff) | |
download | tk-ec0f31f7586f53663f156175c39235356beb09e6.zip tk-ec0f31f7586f53663f156175c39235356beb09e6.tar.gz tk-ec0f31f7586f53663f156175c39235356beb09e6.tar.bz2 |
Fix off-by-one bug in tree indicator size computation [#1596021,
patch from Tim Baker]. Increased default size from 7 to 9 pixels.
Diffstat (limited to 'generic')
-rw-r--r-- | generic/ttk/ttkDefaultTheme.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/generic/ttk/ttkDefaultTheme.c b/generic/ttk/ttkDefaultTheme.c index 6971b3e..6d3f9f4 100644 --- a/generic/ttk/ttkDefaultTheme.c +++ b/generic/ttk/ttkDefaultTheme.c @@ -1,4 +1,4 @@ -/* $Id: ttkDefaultTheme.c,v 1.3 2006/11/03 03:06:22 das Exp $ +/* $Id: ttkDefaultTheme.c,v 1.4 2006/11/14 22:44:30 jenglish Exp $ * * Copyright (c) 2003, Joe English * @@ -1051,7 +1051,7 @@ static Ttk_ElementOptionSpec TreeitemIndicatorOptions[] = { "-foreground", TK_OPTION_COLOR, Tk_Offset(TreeitemIndicator,colorObj), DEFAULT_FOREGROUND }, { "-diameter", TK_OPTION_PIXELS, - Tk_Offset(TreeitemIndicator,diameterObj), "6" }, + Tk_Offset(TreeitemIndicator,diameterObj), "9" }, { "-indicatormargins", TK_OPTION_STRING, Tk_Offset(TreeitemIndicator,marginObj), "0 2 4 2" }, {NULL} @@ -1088,15 +1088,15 @@ static void TreeitemIndicatorDraw( b = Ttk_PadBox(b, padding); XDrawRectangle(Tk_Display(tkwin), d, gc, - b.x, b.y, b.width, b.height); + b.x, b.y, b.width - 1, b.height - 1); - cx = b.x + b.width / 2; - cy = b.y + b.height / 2; - XDrawLine(Tk_Display(tkwin), d, gc, b.x+2, cy, b.x+b.width-2+w, cy); + cx = b.x + (b.width - 1) / 2; + cy = b.y + (b.height - 1) / 2; + XDrawLine(Tk_Display(tkwin), d, gc, b.x+2, cy, b.x+b.width-3+w, cy); if (!(state & TTK_STATE_OPEN)) { /* turn '-' into a '+' */ - XDrawLine(Tk_Display(tkwin), d, gc, cx, b.y+2, cx, b.y+b.height-2+w); + XDrawLine(Tk_Display(tkwin), d, gc, cx, b.y+2, cx, b.y+b.height-3+w); } } |