--- a/ColorMenu.st Mon Nov 19 16:28:39 2001 +0100
+++ b/ColorMenu.st Mon Nov 19 16:39:05 2001 +0100
@@ -751,6 +751,8 @@
|box clr|
box := builder componentAt: #PreviewBox.
+ box isNil ifTrue:[^ self "called before setup"].
+
clr := self color.
box backgroundColor:clr.
@@ -802,20 +804,20 @@
|r g b|
- r := red value.
- g := green value.
- b := blue value.
+ r := self red value.
+ g := self green value.
+ b := self blue value.
Color withHLSFromRed:(r * 100 / 255) green:(g * 100 / 255) blue:(b * 100 / 255) do:[:h :l :s |
h isNil ifTrue:[
"/ achromatic
] ifFalse:[
- hue value:(h rounded) withoutNotifying:self.
+ self hue value:(h rounded) withoutNotifying:self.
].
- light value:(l rounded) withoutNotifying:self.
- saturation value:(s rounded) withoutNotifying:self.
+ self light value:(l rounded) withoutNotifying:self.
+ self saturation value:(s rounded) withoutNotifying:self.
].
- colorNameHolder value:'' withoutNotifying:self.
+ self colorNameHolder value:'' withoutNotifying:self.
self colorChanged
! !
@@ -911,5 +913,5 @@
!ColorMenu class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg2/ColorMenu.st,v 1.25 2001-11-09 21:47:20 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg2/ColorMenu.st,v 1.26 2001-11-19 15:39:05 cg Exp $'
! !