--- a/MenuPanel.st Sat Apr 24 18:48:23 1999 +0200
+++ b/MenuPanel.st Sat Apr 24 18:54:20 1999 +0200
@@ -413,8 +413,20 @@
].
ButtonActiveBackgroundColor := menuStyle at:#'button.activeBackgroundColor' default: DefaultBackgroundColor.
ButtonPassiveBackgroundColor := (menuStyle at:#'button.backgroundColor') ? (menuStyle at:'viewBackground') ? DefaultBackgroundColor.
- ButtonLightColor := (menuStyle at:#'button.lightColor') ? Color white.
- ButtonShadowColor := menuStyle at:#'button.shadowColor' default:(style == #next ifTrue:[Color black] ifFalse:[Color gray]).
+
+ ButtonLightColor := menuStyle at:#'button.lightColor'.
+ ButtonLightColor isNil ifTrue:[
+ ButtonLightColor := (ButtonPassiveBackgroundColor averageColorIn:(0@0 corner:7@7)) lightened. "/ Color white
+ ].
+ ButtonShadowColor := menuStyle at:#'button.shadowColor'.
+ ButtonShadowColor isNil ifTrue:[
+ ButtonShadowColor := (ButtonPassiveBackgroundColor averageColorIn:(0@0 corner:7@7)) darkened. "/ Color white
+"/ (style == #next ifTrue:[
+"/ ButtonShadowColor := Color black
+"/ ] ifFalse:[
+"/ ButtonShadowColor := Color gray
+"/ ]
+ ].
ButtonHalfLightColor := menuStyle at:#'button.halfLightColor'.
ButtonHalfShadowColor := menuStyle at:#'button.halfShadowColor'.
ButtonEdgeStyle := menuStyle at:#'button.edgeStyle'.
@@ -2782,7 +2794,7 @@
super initStyle.
- self viewBackground:DefaultBackgroundColor.
+ viewBackground := DefaultBackgroundColor.
onLevel := DefaultHilightLevel.
offLevel := 0. "/ DefaultLevel.
@@ -5405,6 +5417,6 @@
!MenuPanel class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg2/MenuPanel.st,v 1.158 1999-04-24 14:22:50 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg2/MenuPanel.st,v 1.159 1999-04-24 16:54:20 cg Exp $'
! !
MenuPanel initialize!