BorderedWrapper.st
changeset 323 ee2f4da361a6
parent 320 b651cc5827a1
child 365 47e0d48fd769
--- a/BorderedWrapper.st	Sat Jul 20 13:08:10 1996 +0200
+++ b/BorderedWrapper.st	Mon Jul 22 11:02:58 1996 +0200
@@ -270,19 +270,6 @@
     "Modified: 5.6.1996 / 01:53:00 / cg"
 ! !
 
-!BorderedWrapper methodsFor:'accessing - bounds'!
-
-bounds:newBounds
-    |v|
-
-    bounds := newBounds.
-    component bounds:(newBounds insetBy:self inset).
-    (v := self view) notNil ifTrue:[v invalidate]
-
-    "Created: 5.6.1996 / 00:52:49 / cg"
-    "Modified: 5.6.1996 / 02:35:30 / cg"
-! !
-
 !BorderedWrapper methodsFor:'displaying'!
 
 displayOn:aGC
@@ -352,6 +339,30 @@
     "Created: 19.7.1996 / 17:22:33 / cg"
 ! !
 
+!BorderedWrapper methodsFor:'private'!
+
+layoutChanged
+    |subBounds b|
+
+    component notNil ifTrue:[
+        b := bounds insetBy:self inset.
+        
+        layout notNil ifTrue:[
+            subBounds := (layout 
+                            rectangleRelativeTo:b
+                            preferred:b) rounded.
+        ] ifFalse:[
+            subBounds := b
+        ].
+
+        origin := b origin.
+"/ Transcript show:layout displayString; show:'subbounds: '; showCR:subBounds.
+        component bounds:subBounds.
+    ]
+
+    "Created: 19.7.1996 / 21:25:02 / cg"
+! !
+
 !BorderedWrapper methodsFor:'queries'!
 
 hasBorder
@@ -369,5 +380,5 @@
 !BorderedWrapper  class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview2/BorderedWrapper.st,v 1.5 1996-07-19 17:20:04 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview2/BorderedWrapper.st,v 1.6 1996-07-22 09:01:46 cg Exp $'
 ! !