checkin from browser
authorClaus Gittinger <cg@exept.de>
Sat, 24 Apr 1999 18:54:20 +0200
changeset 1336 6087005f59a8
parent 1335 8509d0abc6ae
child 1337 f0ed36b3c3d6
checkin from browser
MenuPanel.st
--- 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!