# HG changeset patch # User Claus Gittinger # Date 924974050 -7200 # Node ID d229519bc7829ce722c8219bae526abc3009ab3a # Parent 745aed60b0b29b47b4aa097e715fe2256fab9a22 more style options diff -r 745aed60b0b2 -r d229519bc782 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 $' ! !