RadioButton.st
changeset 4291 85df5b1dfadf
parent 4167 e441bac0abff
child 4505 347980ba9a1b
--- a/RadioButton.st	Sun Jul 17 10:05:51 2011 +0200
+++ b/RadioButton.st	Tue Jul 19 12:30:37 2011 +0200
@@ -844,7 +844,7 @@
     "drawing of the radio image is done here."
 
     |x y img clrTop clrBot imgTop imgBot imgInside imgH imgOn threeD lvl
-     isActive isEntered isEnabled|
+     isActive isEntered isEnabled imgTopHeight|
 
     buttonStyle isNil ifTrue:[
         ^ super drawToggleImage
@@ -906,14 +906,16 @@
         ]
     ].
 
-    imgTop notNil ifTrue:[imgTop := imgTop onDevice:device].
+    imgTopHeight := 0.
+
+    imgTop notNil ifTrue:[imgTop := imgTop onDevice:device. imgTopHeight := imgTop height].
     imgBot notNil ifTrue:[imgBot := imgBot onDevice:device].
     imgInside notNil ifTrue:[imgInside := imgInside onDevice:device].
     imgH notNil ifTrue:[imgH := imgH onDevice:device].
     imgOn notNil ifTrue:[imgOn := imgOn onDevice:device].
 
     x := hSpace + margin.
-    y := (height - imgTop height) // 2.
+    y := (height - imgTopHeight) // 2.
 
     threeD ifFalse:[
         imgTop notNil ifTrue:[
@@ -1097,9 +1099,9 @@
 !RadioButton class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg/RadioButton.st,v 1.49 2010-08-25 20:57:43 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/RadioButton.st,v 1.50 2011-07-19 10:30:37 mb Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libwidg/RadioButton.st,v 1.49 2010-08-25 20:57:43 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/RadioButton.st,v 1.50 2011-07-19 10:30:37 mb Exp $'
 ! !