diff options
author | treectrl <treectrl> | 2006-07-11 00:09:52 (GMT) |
---|---|---|
committer | treectrl <treectrl> | 2006-07-11 00:09:52 (GMT) |
commit | eee333f0ef04f0dc7bd0161b96bae707cf7923b9 (patch) | |
tree | 012706598d11687c9a602ed7b0300c4bdf970634 /generic | |
parent | bf51b17a1f4fc7f073738dae704e9b675c258699 (diff) | |
download | tktreectrl-eee333f0ef04f0dc7bd0161b96bae707cf7923b9.zip tktreectrl-eee333f0ef04f0dc7bd0161b96bae707cf7923b9.tar.gz tktreectrl-eee333f0ef04f0dc7bd0161b96bae707cf7923b9.tar.bz2 |
Playing around with span widths.
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tkTreeColumn.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/generic/tkTreeColumn.c b/generic/tkTreeColumn.c index 6c314ec..d3a53a4 100644 --- a/generic/tkTreeColumn.c +++ b/generic/tkTreeColumn.c @@ -7,7 +7,7 @@ * Copyright (c) 2002-2003 Christian Krone * Copyright (c) 2003 ActiveState Corporation * - * RCS: @(#) $Id: tkTreeColumn.c,v 1.38 2005/09/16 23:23:00 treectrl Exp $ + * RCS: @(#) $Id: tkTreeColumn.c,v 1.39 2006/07/11 00:09:52 treectrl Exp $ */ #include "tkTreeCtrl.h" @@ -3658,6 +3658,12 @@ TreeColumn_WidthOfItems( if (!TreeItem_ReallyVisible(tree, item)) item = TreeItem_NextVisible(tree, item); while (item != NULL) { +#ifdef EXPENSIVE_SPAN_WIDTH /* NOT USED */ + width = TreeItem_NeededWidthOfColumn(tree, item, column->index); + if (column == (Column *) tree->columnTree) + width += TreeItem_Indent(tree, item); + column->widthOfItems = MAX(column->widthOfItems, width); +#else itemColumn = TreeItem_FindColumn(tree, item, column->index); if (itemColumn != NULL) { width = TreeItemColumn_NeededWidth(tree, item, itemColumn); @@ -3665,6 +3671,7 @@ TreeColumn_WidthOfItems( width += TreeItem_Indent(tree, item); column->widthOfItems = MAX(column->widthOfItems, width); } +#endif item = TreeItem_NextVisible(tree, item); } @@ -3800,6 +3807,12 @@ Tree_InvalidateColumnWidth( { Column *column; +#ifdef COLUMN_SPANxxx + /* It may be necessary to recalculate the width of other columns as + * well when column-spanning is in effect. */ + columnIndex = -1; +#endif + if (columnIndex == -1) { column = (Column *) tree->columns; while (column != NULL) { |