diff options
author | treectrl <treectrl> | 2006-12-06 04:00:16 (GMT) |
---|---|---|
committer | treectrl <treectrl> | 2006-12-06 04:00:16 (GMT) |
commit | 0b6bab94778b41c392b11e471cd757958b9abbab (patch) | |
tree | f63534a5a89b5079258a34aa9da9ea9608c6dafa /generic | |
parent | c37aecc13ba3eafdb0a7a3601abc30e8d7518551 (diff) | |
download | tktreectrl-0b6bab94778b41c392b11e471cd757958b9abbab.zip tktreectrl-0b6bab94778b41c392b11e471cd757958b9abbab.tar.gz tktreectrl-0b6bab94778b41c392b11e471cd757958b9abbab.tar.bz2 |
Revert the change involving hiding elements that had non-zero size. Just rely on the style layout option -visible.
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tkTreeStyle.c | 47 |
1 files changed, 11 insertions, 36 deletions
diff --git a/generic/tkTreeStyle.c b/generic/tkTreeStyle.c index 0f1efd6..995ce51 100644 --- a/generic/tkTreeStyle.c +++ b/generic/tkTreeStyle.c @@ -5,7 +5,7 @@ * * Copyright (c) 2002-2006 Tim Baker * - * RCS: @(#) $Id: tkTreeStyle.c,v 1.67 2006/12/04 20:54:54 treectrl Exp $ + * RCS: @(#) $Id: tkTreeStyle.c,v 1.68 2006/12/06 04:00:16 treectrl Exp $ */ #include "tkTreeCtrl.h" @@ -586,6 +586,11 @@ Style_DoLayoutH( eLink1 = &eLinks1[i]; eLink2 = &eLinks2[i]; + layout->visible = PerStateBoolean_ForState(drawArgs->tree, + &eLink1->visible, drawArgs->state, NULL) != 0; + if (IS_HIDDEN(layout)) + continue; + layout->eLink = eLink2; layout->master = eLink1; @@ -602,25 +607,6 @@ Style_DoLayoutH( #endif } - /* Remember whether this element is visible or not. First check the - * -visible style layout option. If it is not false, then check for - * zero size. */ - layout->visible = PerStateBoolean_ForState(drawArgs->tree, - &eLink1->visible, drawArgs->state, NULL) != 0; - if (layout->visible) { -#ifdef CACHE_ELEM_SIZE - if (!DETACH_OR_UNION(eLink1) && (eLink2->neededWidth * - eLink2->neededHeight <= 0)) -#else - if (!DETACH_OR_UNION(eLink1) && (layout->neededWidth * - layout->neededHeight <= 0)) -#endif - layout->visible = 0; - } - - if (IS_HIDDEN(layout)) - continue; - for (j = 0; j < 2; j++) { /* Pad values before expansion */ @@ -1958,6 +1944,11 @@ Style_NeededSize( eLink1 = &eLinks1[i]; eLink2 = &eLinks2[i]; + layout->visible = PerStateBoolean_ForState(tree, + &eLink1->visible, state, NULL) != 0; + if (IS_HIDDEN(layout)) + continue; + layout->master = eLink1; layout->eLink = eLink2; @@ -1977,22 +1968,6 @@ Style_NeededSize( #endif } - layout->visible = PerStateBoolean_ForState(tree, &eLink1->visible, - state, NULL) != 0; - if (layout->visible) { -#ifdef CACHE_ELEM_SIZE - if (!DETACH_OR_UNION(eLink1) && (eLink2->neededWidth * - eLink2->neededHeight <= 0)) -#else - if (!DETACH_OR_UNION(eLink1) && (layout->neededWidth * - layout->neededHeight <= 0)) -#endif - layout->visible = 0; - } - - if (IS_HIDDEN(layout)) - continue; - /* No -union padding yet */ layout->uPadX[PAD_TOP_LEFT] = 0; layout->uPadX[PAD_BOTTOM_RIGHT] = 0; |