class: RadioButton
changed:
#drawToggleImage
#initStyle
access device via message send
--- a/RadioButton.st Tue Feb 18 16:04:30 2014 +0100
+++ b/RadioButton.st Tue Feb 18 16:08:31 2014 +0100
@@ -847,7 +847,7 @@
"drawing of the radio image is done here."
|x y img clrTop clrBot imgTop imgBot imgInside imgH imgOn threeD lvl
- isActive isEntered isEnabled imgTopHeight|
+ isActive isEntered isEnabled imgTopHeight graphicsDevice|
buttonStyle isNil ifTrue:[
^ super drawToggleImage
@@ -910,12 +910,13 @@
].
imgTopHeight := 0.
+ graphicsDevice := self graphicsDevice.
- 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].
+ imgTop notNil ifTrue:[imgTop := imgTop onDevice:graphicsDevice. imgTopHeight := imgTop height].
+ imgBot notNil ifTrue:[imgBot := imgBot onDevice:graphicsDevice].
+ imgInside notNil ifTrue:[imgInside := imgInside onDevice:graphicsDevice].
+ imgH notNil ifTrue:[imgH := imgH onDevice:graphicsDevice].
+ imgOn notNil ifTrue:[imgOn := imgOn onDevice:graphicsDevice].
x := hSpace + margin.
y := (height - imgTopHeight) // 2.
@@ -1024,23 +1025,26 @@
activeBgColor := bgColor.
activeFgColor := fgColor.
buttonStyle == #image ifTrue:[
+ |graphicsDevice|
+
+ graphicsDevice := self graphicsDevice.
buttonOnImage := self class roundOnForm.
- buttonOnImage notNil ifTrue:[ buttonOnImage := buttonOnImage onDevice:device].
+ buttonOnImage notNil ifTrue:[ buttonOnImage := buttonOnImage onDevice:graphicsDevice].
buttonOffImage := self class roundOffForm.
- buttonOffImage notNil ifTrue:[ buttonOffImage := buttonOffImage onDevice:device].
+ buttonOffImage notNil ifTrue:[ buttonOffImage := buttonOffImage onDevice:graphicsDevice].
onImage := self class activeForm.
- onImage notNil ifTrue:[ onImage := onImage onDevice:device].
+ onImage notNil ifTrue:[ onImage := onImage onDevice:graphicsDevice].
offImage := self class passiveForm.
- offImage notNil ifTrue:[ offImage := offImage onDevice:device].
+ offImage notNil ifTrue:[ offImage := offImage onDevice:graphicsDevice].
disabledOnImage := self class disabledActiveForm.
- disabledOnImage notNil ifTrue:[ disabledOnImage := disabledOnImage onDevice:device].
+ disabledOnImage notNil ifTrue:[ disabledOnImage := disabledOnImage onDevice:graphicsDevice].
disabledOffImage := self class disabledPassiveForm.
- disabledOffImage notNil ifTrue:[ disabledOffImage := disabledOffImage onDevice:device].
+ disabledOffImage notNil ifTrue:[ disabledOffImage := disabledOffImage onDevice:graphicsDevice].
enteredOnImage := self class enteredActiveForm.
- enteredOnImage notNil ifTrue:[ enteredOnImage := enteredOnImage onDevice:device].
+ enteredOnImage notNil ifTrue:[ enteredOnImage := enteredOnImage onDevice:graphicsDevice].
enteredOffImage := self class enteredPassiveForm.
- enteredOffImage notNil ifTrue:[ enteredOffImage := enteredOffImage onDevice:device].
+ enteredOffImage notNil ifTrue:[ enteredOffImage := enteredOffImage onDevice:graphicsDevice].
]
] ifFalse:[
buttonStyle == #round2D ifTrue:[
@@ -1103,10 +1107,10 @@
!RadioButton class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg/RadioButton.st,v 1.53 2013-09-04 21:45:24 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg/RadioButton.st,v 1.54 2014-02-18 15:08:31 stefan Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libwidg/RadioButton.st,v 1.53 2013-09-04 21:45:24 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg/RadioButton.st,v 1.54 2014-02-18 15:08:31 stefan Exp $'
! !