more stuff defined in styleSheet
authorClaus Gittinger <cg@exept.de>
Mon, 19 Aug 2002 18:23:41 +0200
changeset 2583 12b39e2bc41c
parent 2582 edd71c89378d
child 2584 60387225f33c
more stuff defined in styleSheet
RadioButton.st
--- a/RadioButton.st	Mon Aug 19 18:12:22 2002 +0200
+++ b/RadioButton.st	Mon Aug 19 18:23:41 2002 +0200
@@ -10,10 +10,14 @@
  hereby transferred.
 "
 
+"{ Package: 'stx:libwidg' }"
+
 Toggle subclass:#RadioButton
 	instanceVariableNames:'buttonStyle buttonOnLevel buttonOffLevel buttonOffImage
 		buttonOnImage'
 	classVariableNames:'DefaultButtonStyle DefaultActiveLevel DefaultPassiveLevel
+		DefaultForegroundColor DefaultBackgroundColor
+		DefaultActiveForegroundColor DefaultActiveBackgroundColor
 		MotifCheckBotForm MotifCheckTopForm MotifCheckInnerForm
 		Round3DCheckBotForm Round3DCheckTopForm Round3DCheckInnerForm
 		RoundHalfLightForm RoundOffForm RoundOnForm'
@@ -490,7 +494,12 @@
                        #'radioButton.activeImageFile'
                        #'radioButton.activeImage'
                        #'radioButton.passiveImageFile'
-                       #'radioButton.passiveImage')>
+                       #'radioButton.passiveImage'
+                       #'radioButton.foregroundColor'
+                       #'radioButton.backgroundColor'
+                       #'radioButton.activeForegroundColor'
+                       #'radioButton.activeBackgroundColor'
+                      )>
 
     |l f|
 
@@ -501,6 +510,12 @@
     DefaultButtonStyle == #motif ifTrue:[l := 1].
     DefaultPassiveLevel := StyleSheet at:#'radioButton.passiveLevel' default:l.
 
+    DefaultForegroundColor := StyleSheet at:#'radioButton.foregroundColor'.
+    DefaultBackgroundColor := StyleSheet at:#'radioButton.backgroundColor'.
+
+    DefaultActiveForegroundColor := StyleSheet at:#'radioButton.activeForegroundColor'.
+    DefaultActiveBackgroundColor := StyleSheet at:#'radioButton.activeBackgroundColor'.
+
     RoundOnForm := RoundOffForm := nil.
 
     f := StyleSheet at:#'radioButton.activeImageFile'.
@@ -704,6 +719,9 @@
 
     super initStyle.
 
+    fgColor := DefaultForegroundColor ? fgColor.
+    bgColor := DefaultBackgroundColor ? bgColor.
+    activeBgColor := DefaultActiveBackgroundColor ? activeBgColor.
     enteredBgColor := bgColor.
 
     buttonStyle isNil ifTrue:[
@@ -787,5 +805,5 @@
 !RadioButton class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg/RadioButton.st,v 1.33 1999-12-09 11:13:24 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/RadioButton.st,v 1.34 2002-08-19 16:23:41 cg Exp $'
 ! !