Andreas Raab uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-ar.369.mcz==================== Summary ====================
Name: Morphic-ar.369
Author: ar
Time: 1 March 2010, 10:01:12.336 pm
UUID: 375d76a2-472e-aa4c-9550-87bdfad95737
Ancestors: Morphic-tfel.367, Morphic-ar.368
Merging Morphic-tfel.367
Do not apply gradients on menus more than once. This fixes a bug where submenus got increasingly whiter with gradient menus activated after opening and closing them several times. (Without closing the parent menu)
=============== Diff against Morphic-ar.368 ===============
Item was changed:
----- Method: MenuMorph>>updateColor (in category 'control') -----
updateColor
| fill title |
Preferences gradientMenu
ifFalse: [^ self].
+ (self fillStyle == self color) not
+ ifTrue: [^ self]. "Don't apply the gradient more than once"
""
fill := GradientFillStyle ramp: {0.0 -> Color white. 1 -> self color}.
""
fill
radial: false;
origin: self topLeft;
direction: 0 @ self height.
""
self fillStyle: fill.
"
update the title color"
title := self allMorphs
detect: [:each | each hasProperty: #titleString]
ifNone: [^ self].
""
fill := GradientFillStyle ramp: {0.0 -> title color twiceLighter. 1 -> title color twiceDarker}.
""
fill
origin: title topLeft;
direction: title width @ 0.
""
title fillStyle: fill!