Button.st
changeset 131 208fa92f434d
parent 130 338e856bddc9
child 133 e58c7c979f33
--- a/Button.st	Tue Jun 06 06:16:07 1995 +0200
+++ b/Button.st	Tue Jun 27 04:24:41 1995 +0200
@@ -39,7 +39,7 @@
 COPYRIGHT (c) 1989 by Claus Gittinger
 	      All Rights Reserved
 
-$Header: /cvs/stx/stx/libwidg/Button.st,v 1.24 1995-06-06 04:12:27 claus Exp $
+$Header: /cvs/stx/stx/libwidg/Button.st,v 1.25 1995-06-27 02:22:17 claus Exp $
 '!
 
 !Button class methodsFor:'documentation'!
@@ -60,7 +60,7 @@
 
 version
 "
-$Header: /cvs/stx/stx/libwidg/Button.st,v 1.24 1995-06-06 04:12:27 claus Exp $
+$Header: /cvs/stx/stx/libwidg/Button.st,v 1.25 1995-06-27 02:22:17 claus Exp $
 "
 !
 
@@ -431,11 +431,11 @@
 
       adaptor1 := PluggableAdaptor new 
 			getBlock:[:m | false] 
-			putBlock:[:m :v | Transcript show:'eat: '; showCr:v]
+			putBlock:[:m :v | Transcript showCr:'eat']
 			updateBlock:nil.
       adaptor2 := PluggableAdaptor new 
 			getBlock:[:m | false] 
-			putBlock:[:m :v | Transcript show:'drink: '; showCr:v]
+			putBlock:[:m :v | Transcript showCr:'drink']
 			updateBlock:nil.
 
       top := StandardSystemView new.
@@ -464,10 +464,10 @@
 		origin:0.0 @ 0.0 corner:1.0 @ 50 in:top.
 
       b := Button label:'eat me' in:panel.
-      b action:[:v | Transcript show:'eat: '; showCr:v].
+      b action:[Transcript showCr:'eat'].
 
       b := Button label:'drink me' in:panel.
-      b action:[:v | Transcript show:'drink: '; showCr:v].
+      b action:[Transcript showCr:'drink'].
 
       top open.
 
@@ -1201,15 +1201,21 @@
 preferredExtent
     "return my preferred extent - this is the minimum size I would like to have"
 
-    |extra|
+    |extraH extraV|
 
     logo notNil ifTrue:[
-	extra := (onLevel abs max:offLevel abs) + ViewSpacing * 2.
+"
+	extraH := extraV := (onLevel abs max:offLevel abs) + ViewSpacing * 2.
+"
+	extraH := extraV := (onLevel abs max:offLevel abs).
+	extraH := (extraH + hSpace * 2).
+	extraV := (extraV + vSpace * 2).
+
 	self is3D ifFalse:[
 	    "add space for a frame around"
-	    extra := extra + 2.
+	    extraH := extraH + 2. extraV := extraV + 2.
 	].
-	^ (labelWidth + extra) @ (labelHeight + extra)
+	^ (labelWidth + extraH) @ (labelHeight + extraV)
     ].
 
     ^ super preferredExtent
@@ -1239,7 +1245,7 @@
     ]
 !
 
-resize
+XXresize
     "resize myself to make logo fit into myself.
      Redefined, since we add space for a frame around text when non-3D"