--- a/CheckBox.st Tue Dec 12 13:34:34 1995 +0100
+++ b/CheckBox.st Thu Dec 14 14:55:40 1995 +0100
@@ -12,10 +12,11 @@
HorizontalPanelView subclass:#CheckBox
- instanceVariableNames:'toggleView labelView'
- classVariableNames:''
- poolDictionaries:''
- category:'Views-Interactors'
+ instanceVariableNames:'toggleView labelView labelForegroundColor
+ disabledLabelForegroundColor'
+ classVariableNames:'DefaultLabelForegroundColor DefaultDisabledLabelForegroundColor'
+ poolDictionaries:''
+ category:'Views-Interactors'
!
!CheckBox class methodsFor:'documentation'!
@@ -219,6 +220,20 @@
^ self new model:aModel
! !
+!CheckBox class methodsFor:'defaults'!
+
+updateStyleCache
+ DefaultLabelForegroundColor := StyleSheet colorAt:'checkBoxLabelForegroundColor'.
+ DefaultDisabledLabelForegroundColor := StyleSheet colorAt:'checkBoxDisabledLabelForegroundColor'.
+
+ "
+ self updateStyleCache
+ "
+
+ "Created: 14.12.1995 / 14:47:22 / cg"
+ "Modified: 14.12.1995 / 14:47:36 / cg"
+! !
+
!CheckBox methodsFor:'accessing'!
labelView
@@ -246,15 +261,27 @@
disable
"forward to toggle & change labels color"
+ |clr|
+
toggleView disable.
- labelView foregroundColor:(toggleView disabledForegroundColor).
+ clr := disabledLabelForegroundColor.
+ clr isNil ifTrue:[ clr := toggleView disabledForegroundColor ].
+ labelView foregroundColor:clr.
+
+ "Modified: 14.12.1995 / 14:50:54 / cg"
!
enable
"forward to toggle & change labels color"
+ |clr|
+
toggleView enable.
- labelView foregroundColor:(toggleView foregroundColor).
+ clr := labelForegroundColor.
+ clr isNil ifTrue:[ clr := toggleView foregroundColor ].
+ labelView foregroundColor:clr.
+
+ "Modified: 14.12.1995 / 14:51:19 / cg"
!
pressAction:aBlock
@@ -355,6 +382,19 @@
!CheckBox methodsFor:'initialization'!
+initStyle
+ super initStyle.
+
+ DefaultLabelForegroundColor notNil ifTrue:[
+ labelForegroundColor := DefaultLabelForegroundColor on:device.
+ ].
+ DefaultDisabledLabelForegroundColor notNil ifTrue:[
+ disabledLabelForegroundColor := DefaultDisabledLabelForegroundColor on:device.
+ ].
+
+ "Created: 14.12.1995 / 14:50:03 / cg"
+!
+
initialize
super initialize.
@@ -409,5 +449,5 @@
!CheckBox class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg2/CheckBox.st,v 1.14 1995-11-23 18:17:40 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg2/CheckBox.st,v 1.15 1995-12-14 13:55:40 cg Exp $'
! !