UIPainterView.st
changeset 1252 f886528c2b35
parent 1230 23e5d0c133e8
child 1257 acb8c0a58ef3
--- a/UIPainterView.st	Wed Oct 06 14:32:45 1999 +0200
+++ b/UIPainterView.st	Fri Oct 08 17:12:31 1999 +0200
@@ -1675,6 +1675,26 @@
         ].
     ].
 
+    aSpec class isLayoutContainer ifTrue:[
+        "/ TODO:
+        "/ go through subviews and let them resize to their default/preferred
+        "/ needed if we change a containers layout from fit to non-fit.
+
+        aView subViews do:[:aSubView |
+            |fix spec prop|
+
+            (prop := self propertyOfView:aSubView) notNil ifTrue:[
+                spec := prop spec.
+
+                spec useDefaultExtent ifTrue:[
+                    fix := aSubView sizeFixed:false.
+                    aSubView extent:aSubView preferredExtent.
+                    aSubView sizeFixed:fix
+                ]
+            ]
+        ].
+    ].
+
     aSpec needsRebuildForAttributes ifTrue:[
         "/ needs a full rebuild (in case view class depends upon spec-attribute)
         v := aSpec buildViewWithLayoutFor:builder in:(self findContainerOfView:aView).