From a57407aeb8cf8bb0cdcd42c5dda2718197743d57 Mon Sep 17 00:00:00 2001 From: megacz Date: Fri, 30 Jan 2004 06:50:31 +0000 Subject: [PATCH] 2002/09/23 23:17:48 darcs-hash:20040130065031-2ba56-ca56528ded029770f30a4486fafa7e0e6cd2c04c.gz --- CHANGES | 3 ++- src/org/xwt/SpecialBoxProperty.java | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index a40eb0a..0c098bc 100644 --- a/CHANGES +++ b/CHANGES @@ -412,4 +412,5 @@ 15-Sep megacz XWT.java: new retheme() syntax - +23-Sep megacz SpecialBoxProperty.java: invisible now returns true if + any of the box's ancestors is invisible. diff --git a/src/org/xwt/SpecialBoxProperty.java b/src/org/xwt/SpecialBoxProperty.java index f9880bf..b6d2cfc 100644 --- a/src/org/xwt/SpecialBoxProperty.java +++ b/src/org/xwt/SpecialBoxProperty.java @@ -376,7 +376,10 @@ class SpecialBoxProperty { } }); specialBoxProperties.put("invisible", new SpecialBoxProperty() { - public Object get(Box b) { return b.invisible ? Boolean.TRUE : Boolean.FALSE; } + public Object get(Box b) { + for (Box cur = b; cur != null; cur = cur.getParent()) { if (cur.invisible) return Boolean.TRUE; } + return Boolean.FALSE; + } public void put(Box b, Object value) { boolean newinvisible = stob(value); if (newinvisible == b.invisible) return; -- 1.7.10.4