Toggle.st
changeset 4919 8b1ff4b1354a
parent 4006 7b3f74c6aa7b
child 5241 a994c267e55e
--- a/Toggle.st	Tue Feb 18 17:55:57 2014 +0100
+++ b/Toggle.st	Tue Feb 18 17:59:47 2014 +0100
@@ -449,7 +449,7 @@
 
     super fetchDeviceResources.
 
-    lampColor notNil ifTrue:[lampColor := lampColor onDevice:device].
+    lampColor notNil ifTrue:[lampColor := lampColor onDevice:self graphicsDevice].
 
     "Created: 13.1.1997 / 23:46:31 / cg"
 !
@@ -483,9 +483,9 @@
 
     lampColor := DefaultLampColor.
     mm := styleSheet at:#'toggle.lampWidthMM' default:1.5.
-    lampWidth := (device horizontalPixelPerMillimeter * mm) rounded.
+    lampWidth := (self graphicsDevice horizontalPixelPerMillimeter * mm) rounded.
     mm := styleSheet at:#'toggle.lampHeightMM' default:3.0.
-    lampHeight := (device verticalPixelPerMillimeter * mm) rounded.
+    lampHeight := (self graphicsDevice verticalPixelPerMillimeter * mm) rounded.
 
     onLevel := styleSheet at:#'toggle.activeLevel' default:onLevel.
     offLevel := styleSheet at:#'toggle.passiveLevel' default:offLevel.
@@ -507,8 +507,8 @@
     bg := styleSheet colorAt:#'toggle.backgroundColor'.
     bg notNil ifTrue:[
         self backgroundColor:bg.
-        shadowColor := (bg averageColorIn:(0@0 corner:7@7)) darkened onDevice:device.
-        lightColor := (bg averageColorIn:(0@0 corner:7@7)) lightened onDevice:device.
+        shadowColor := (bg averageColorIn:(0@0 corner:7@7)) darkened onDevice:self graphicsDevice.
+        lightColor := (bg averageColorIn:(0@0 corner:7@7)) lightened onDevice:self graphicsDevice.
     ].
 
     "Modified: / 3.11.1997 / 02:22:02 / cg"
@@ -626,9 +626,10 @@
 !Toggle class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg/Toggle.st,v 1.56 2009-10-21 14:28:02 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/Toggle.st,v 1.57 2014-02-18 16:59:47 stefan Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libwidg/Toggle.st,v 1.56 2009-10-21 14:28:02 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/Toggle.st,v 1.57 2014-02-18 16:59:47 stefan Exp $'
 ! !
+