--- a/VariablePanel.st Wed Jun 29 14:14:14 2011 +0200
+++ b/VariablePanel.st Wed Jun 29 15:17:58 2011 +0200
@@ -920,6 +920,9 @@
!
relativeCorners
+ "the returned collection gives the corner-fractional value for each component;
+ i.e. for a 20-40-40 look, it would be #(0.2 0.6 1.0)"
+
^ self subViews
collect:[:eachView |
self isHorizontal ifTrue:[
@@ -930,13 +933,16 @@
]
!
-relativeCorners:aCollection
+relativeCorners:aCollectionOfRelativeCornerPositions
+ "the argument gives the corner-fractional value for each component;
+ i.e. for a 20-40-40 look, it would be #(0.2 0.6 1.0)"
+
|pos|
- aCollection size == self subViews size ifFalse:[^ self ].
+ aCollectionOfRelativeCornerPositions size == self subViews size ifFalse:[^ self ].
pos := 0.0.
- self subViews with:aCollection
+ self subViews with:aCollectionOfRelativeCornerPositions
do:[:eachView :eachCorner |
self isHorizontal ifTrue:[
eachView origin:(pos @ 0.0) corner:(eachCorner @ 1.0)
@@ -944,7 +950,10 @@
eachView origin:(0.0 @ pos) corner:(1.0 @ eachCorner)
].
pos := eachCorner
- ]
+ ].
+ self realized ifTrue:[
+ self resizeSubviews
+ ].
! !
!VariablePanel methodsFor:'accessing-look'!
@@ -2593,9 +2602,9 @@
!VariablePanel class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg/VariablePanel.st,v 1.92 2010-12-19 08:40:16 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg/VariablePanel.st,v 1.93 2011-06-29 13:17:58 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libwidg/VariablePanel.st,v 1.92 2010-12-19 08:40:16 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg/VariablePanel.st,v 1.93 2011-06-29 13:17:58 cg Exp $'
! !