--- a/Toggle.st Sat Apr 24 18:05:42 1999 +0200
+++ b/Toggle.st Sat Apr 24 18:30:11 1999 +0200
@@ -365,8 +365,8 @@
<resource: #style (#'toggle.showLamp'
#'toggle.lampColor')>
- DefaultShowLamp := StyleSheet at:'toggle.showLamp' default:false.
- DefaultLampColor := StyleSheet colorAt:'toggle.lampColor' default:Color yellow.
+ DefaultShowLamp := StyleSheet at:#'toggle.showLamp' default:false.
+ DefaultLampColor := StyleSheet colorAt:#'toggle.lampColor' default:Color yellow.
LampInset := 1 "2".
"Modified: / 3.11.1997 / 11:42:19 / cg"
@@ -448,7 +448,7 @@
initStyle
"setup viewStyle specifics"
- |mm|
+ |mm bg|
super initStyle.
@@ -463,11 +463,18 @@
].
lampColor := DefaultLampColor.
- mm := StyleSheet at:'toggle.lampWidthMM' default:1.5.
+ mm := StyleSheet at:#'toggle.lampWidthMM' default:1.5.
lampWidth := (device horizontalPixelPerMillimeter * mm) rounded.
- mm := StyleSheet at:'toggle.lampHeightMM' default:3.0.
+ mm := StyleSheet at:#'toggle.lampHeightMM' default:3.0.
lampHeight := (device verticalPixelPerMillimeter * mm) rounded.
+ bg := styleSheet at:#'toggle.backgroundColor'.
+ bg notNil ifTrue:[
+ self backgroundColor:(bg onDevice:device).
+ shadowColor := bg darkened onDevice:device.
+ lightColor := bg lightened onDevice:device.
+ ].
+
"Modified: / 3.11.1997 / 02:22:02 / cg"
! !
@@ -610,5 +617,5 @@
!Toggle class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg/Toggle.st,v 1.42 1998-06-06 17:54:27 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg/Toggle.st,v 1.43 1999-04-24 16:30:11 cg Exp $'
! !