VerticalPanelView.st
changeset 793 12396da0e36e
parent 713 0c38ad51016d
child 797 2f9cd56f48ee
--- a/VerticalPanelView.st	Wed Jul 17 12:09:58 1996 +0200
+++ b/VerticalPanelView.st	Wed Jul 17 14:23:24 1996 +0200
@@ -17,7 +17,7 @@
 	category:'Views-Layout'
 !
 
-!VerticalPanelView class methodsFor:'documentation'!
+!VerticalPanelView  class methodsFor:'documentation'!
 
 copyright
 "
@@ -798,7 +798,7 @@
      now set positions
     "
     subViews keysAndValuesDo:[:index :child |
-        |xpos advance bwChild wChild newWChild|
+        |xpos advance bwChild wChild newWChild x2|
 
         wChild := child widthIncludingBorder.
         bwChild := child borderWidth.
@@ -808,7 +808,7 @@
         ].
 
         hL == #left ifTrue:[
-            xpos := 0
+            xpos := 0 - borderWidth.
         ] ifFalse:[
             hL == #leftSpace ifTrue:[
                 xpos := horizontalSpace
@@ -824,12 +824,12 @@
                             newWChild := width - (horizontalSpace +  bwChild * 2)
                         ] ifFalse:[
                             hL == #fit ifTrue:[
-                                newWChild := width - (bwChild * 2).
+                                newWChild := width "- (bwChild * 2)".
                                 child level == 0 ifTrue:[
-                                    xpos := margin.
+                                    xpos := margin - borderWidth.
                                     newWChild := newWChild - m2
                                 ] ifFalse:[
-                                    xpos := 0. 
+                                    xpos := 0 - borderWidth. 
                                 ].
                             ] ifFalse:[
                                 "centered"
@@ -844,13 +844,14 @@
             child width:newWChild
         ].
 
-        (xpos < 0) ifTrue:[ xpos := 0 ].
+"/        (xpos < 0) ifTrue:[ xpos := 0 ].
+
+        x2 := xpos + (child widthIncludingBorder - 1).
 
         (vLayout == #fit 
         or:[vLayout == #fitSpace]) ifTrue:[
             child origin:(xpos @ ypos rounded)
-                  corner:(xpos + (child width - 1))
-                         @ (ypos + hEach - bwChild - 1) rounded.
+                  corner:(x2 @ (ypos + hEach - bwChild - 1) rounded).
             advance := hEach
         ] ifFalse:[
             child origin:(xpos@ypos).
@@ -868,13 +869,13 @@
                 ].
             ].
             y notNil ifTrue:[
-                subViews last corner:(xpos + child width - 1) @ y
+                subViews last corner:x2 @ y
             ]
         ]
     ]
 
     "Modified: 4.9.1995 / 18:43:29 / claus"
-    "Modified: 22.2.1996 / 21:25:42 / cg"
+    "Modified: 17.7.1996 / 12:01:31 / cg"
 ! !
 
 !VerticalPanelView methodsFor:'queries'!
@@ -943,8 +944,8 @@
     "Modified: 29.5.1996 / 12:10:24 / cg"
 ! !
 
-!VerticalPanelView class methodsFor:'documentation'!
+!VerticalPanelView  class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg/VerticalPanelView.st,v 1.23 1996-05-29 10:20:24 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/VerticalPanelView.st,v 1.24 1996-07-17 12:23:24 cg Exp $'
 ! !