more style options
authorClaus Gittinger <cg@exept.de>
Sat, 24 Apr 1999 19:14:10 +0200
changeset 1876 d229519bc782
parent 1875 745aed60b0b2
child 1877 a46bf520f9c6
more style options
Toggle.st
--- a/Toggle.st	Sat Apr 24 18:57:12 1999 +0200
+++ b/Toggle.st	Sat Apr 24 19:14:10 1999 +0200
@@ -468,14 +468,26 @@
     mm := StyleSheet at:#'toggle.lampHeightMM' default:3.0.
     lampHeight := (device verticalPixelPerMillimeter * mm) rounded.
 
-    fg := styleSheet at:#'toggle.foregroundColor'.
+    onLevel := styleSheet at:#'toggle.activeLevel' default:onLevel.
+    offLevel := styleSheet at:#'toggle.passiveLevel' default:offLevel.
+
+    fg := styleSheet colorAt:#'toggle.activeForegroundColor'.
     fg notNil ifTrue:[
-        self foregroundColor:(fg onDevice:device).
+        activeFgColor := fg.
+    ].
+    bg := styleSheet colorAt:#'toggle.activeBackgroundColor'.
+    bg notNil ifTrue:[
+        activeBgColor := bg.
     ].
 
-    bg := styleSheet at:#'toggle.backgroundColor'.
+    fg := styleSheet colorAt:#'toggle.foregroundColor'.
+    fg notNil ifTrue:[
+        self foregroundColor:fg.
+    ].
+
+    bg := styleSheet colorAt:#'toggle.backgroundColor'.
     bg notNil ifTrue:[
-        self backgroundColor:(bg onDevice:device).
+        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.
     ].
@@ -622,5 +634,5 @@
 !Toggle class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg/Toggle.st,v 1.44 1999-04-24 16:55:54 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/Toggle.st,v 1.45 1999-04-24 17:14:10 cg Exp $'
 ! !