summaryrefslogtreecommitdiffstats
path: root/generic/ttk/ttkTreeview.c
diff options
context:
space:
mode:
authorjenglish <jenglish@flightlab.com>2007-11-08 01:40:24 (GMT)
committerjenglish <jenglish@flightlab.com>2007-11-08 01:40:24 (GMT)
commit20121b9b291bee97ea1985c2b3c16470ee92afa1 (patch)
treeadd48b19aba5fd375a93fc51364bb2e52cfb953d /generic/ttk/ttkTreeview.c
parent467a688247fb6279144a01f04bac8aac679d166b (diff)
downloadtk-20121b9b291bee97ea1985c2b3c16470ee92afa1.zip
tk-20121b9b291bee97ea1985c2b3c16470ee92afa1.tar.gz
tk-20121b9b291bee97ea1985c2b3c16470ee92afa1.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.c8
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(