diff options
author | jenglish@flightlab.com <jenglish> | 2007-11-08 01:40:24 (GMT) |
---|---|---|
committer | jenglish@flightlab.com <jenglish> | 2007-11-08 01:40:24 (GMT) |
commit | 132c425dc6f17343a9f048737bc53d72b559bf7e (patch) | |
tree | add48b19aba5fd375a93fc51364bb2e52cfb953d /generic/ttk/ttkTreeview.c | |
parent | b1e6bb188a59d356a001a220869fa6002507fd2f (diff) | |
download | tk-132c425dc6f17343a9f048737bc53d72b559bf7e.zip tk-132c425dc6f17343a9f048737bc53d72b559bf7e.tar.gz tk-132c425dc6f17343a9f048737bc53d72b559bf7e.tar.bz2 |
Ttk_ElementSize: Fixed longstanding, subtle bug that caused element padding
to sometimes be counted twice in size computations.
Fix ElementSizeProcs affected by previous change.
Diffstat (limited to 'generic/ttk/ttkTreeview.c')
-rw-r--r-- | generic/ttk/ttkTreeview.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/generic/ttk/ttkTreeview.c b/generic/ttk/ttkTreeview.c index 73928c5..a9d53e3 100644 --- a/generic/ttk/ttkTreeview.c +++ b/generic/ttk/ttkTreeview.c @@ -1,4 +1,4 @@ -/* $Id: ttkTreeview.c,v 1.20 2007/11/05 00:00:00 jenglish Exp $ +/* $Id: ttkTreeview.c,v 1.21 2007/11/08 01:40:25 jenglish Exp $ * Copyright (c) 2004, Joe English * * ttk::treeview widget implementation. @@ -3099,12 +3099,14 @@ static void TreeitemIndicatorSize( int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr) { TreeitemIndicator *indicator = elementRecord; + Ttk_Padding margins; int size = 0; - Ttk_GetPaddingFromObj(NULL, tkwin, indicator->marginsObj, paddingPtr); + Ttk_GetPaddingFromObj(NULL, tkwin, indicator->marginsObj, &margins); Tk_GetPixelsFromObj(NULL, tkwin, indicator->sizeObj, &size); - *widthPtr = *heightPtr = size; + *widthPtr = size + Ttk_PaddingWidth(margins); + *heightPtr = size + Ttk_PaddingHeight(margins); } static void TreeitemIndicatorDraw( |