VerticalPanelView.st
changeset 321 00c17944cb00
parent 205 6814c0bf8df8
child 341 7f5c67028a04
--- a/VerticalPanelView.st	Tue Feb 06 17:32:15 1996 +0100
+++ b/VerticalPanelView.st	Tue Feb 06 21:46:13 1996 +0100
@@ -11,10 +11,10 @@
 "
 
 PanelView subclass:#VerticalPanelView
-	 instanceVariableNames:''
-	 classVariableNames:''
-	 poolDictionaries:''
-	 category:'Views-Layout'
+	instanceVariableNames:''
+	classVariableNames:''
+	poolDictionaries:''
+	category:'Views-Layout'
 !
 
 !VerticalPanelView class methodsFor:'documentation'!
@@ -862,49 +862,53 @@
     maxHeight := 0.
 
     subViews do:[:child |
-	|childsPreference|
+        |childsPreference|
 
-	childsPreference := child preferredExtent.
-	sumOfHeights := sumOfHeights + childsPreference y.
-	maxHeight := maxHeight max:childsPreference y.
-	maxWidth := maxWidth max:childsPreference x.
+        childsPreference := child preferredExtent.
+        sumOfHeights := sumOfHeights + childsPreference y.
+        maxHeight := maxHeight max:childsPreference y.
+        maxWidth := maxWidth max:childsPreference x.
 
 "/        sumOfHeights := sumOfHeights + child heightIncludingBorder.
 "/        maxWidth := maxWidth max:(child widthIncludingBorder).
 "/        maxHeight := maxHeight max:(child heightIncludingBorder).
     ].
+
     borderWidth ~~ 0 ifTrue:[
-	sumOfHeights := sumOfHeights + (horizontalSpace * 2).
-	maxWidth := maxWidth + (horizontalSpace * 2).
+        sumOfHeights := sumOfHeights + (verticalSpace * 2).
+        maxWidth := maxWidth + (horizontalSpace * 2).
     ].
+
     (vLayout == #fit or:[vLayout == #fitSpace]) ifTrue:[
-	sumOfHeights := maxHeight * subViews size.
-	borderWidth ~~ 0 ifTrue:[
-	    sumOfHeights := sumOfHeights + (verticalSpace * 2).
-	]
+        sumOfHeights := maxHeight * subViews size.
+        borderWidth ~~ 0 ifTrue:[
+            sumOfHeights := sumOfHeights + (verticalSpace * 2).
+        ]
     ] ifFalse:[
-	sumOfHeights := sumOfHeights + ((subViews size - 1) * verticalSpace).
-	vLayout == #topSpace ifTrue:[
-	    sumOfHeights := sumOfHeights + verticalSpace
-	] ifFalse:[
-	    ((vLayout == #center) or:[vLayout == #spread]) ifTrue:[
-		sumOfHeights := sumOfHeights + (verticalSpace * 2)
-	    ]
-	].
+        sumOfHeights := sumOfHeights + ((subViews size - 1) * verticalSpace).
+        vLayout == #topSpace ifTrue:[
+            sumOfHeights := sumOfHeights + verticalSpace
+        ] ifFalse:[
+            ((vLayout == #center) or:[vLayout == #spread]) ifTrue:[
+                sumOfHeights := sumOfHeights + (verticalSpace * 2)
+            ]
+        ].
     ].
 
     ((hLayout == #leftSpace) or:[hLayout == #rightSpace]) ifTrue:[
-	maxWidth := maxWidth + horizontalSpace
+        maxWidth := maxWidth + horizontalSpace
     ] ifFalse:[
-	((hLayout == #fitSpace) or:[hLayout == #center]) ifTrue:[
-	    maxWidth := maxWidth + (horizontalSpace * 2)
-	]        
+        ((hLayout == #fitSpace) or:[hLayout == #center]) ifTrue:[
+            maxWidth := maxWidth + (horizontalSpace * 2)
+        ]        
     ].
     ^ maxWidth @ sumOfHeights
+
+    "Modified: 6.2.1996 / 14:31:20 / cg"
 ! !
 
 !VerticalPanelView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg/VerticalPanelView.st,v 1.17 1995-11-23 18:16:34 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/VerticalPanelView.st,v 1.18 1996-02-06 20:46:13 cg Exp $'
 ! !