<div dir="ltr">The gradientMenu stuff is pretty bad.<div><br></div><div>Best,</div><div>Karl</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Aug 3, 2016 at 3:28 PM, <span dir="ltr"><<a href="mailto:commits@source.squeak.org" target="_blank">commits@source.squeak.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Marcel Taeumel uploaded a new version of Morphic to project The Trunk:<br>
<a href="http://source.squeak.org/trunk/Morphic-mt.1228.mcz" rel="noreferrer" target="_blank">http://source.squeak.org/trunk/Morphic-mt.1228.mcz</a><br>
<br>
==================== Summary ====================<br>
<br>
Name: Morphic-mt.1228<br>
Author: mt<br>
Time: 3 August 2016, 3:28:25.722418 pm<br>
UUID: 24a39e09-443b-0b41-8d8d-3bd49125fe20<br>
Ancestors: Morphic-mt.1227<br>
<br>
Some last-minute UI theming fix, which applies to the non-flat look (i.e. using gradients) in progress bars. Implementation is not perfect but consistent with LazyListMorph selections, now.<br>
<br>
Note that, in the future, we should untangle the use of #gradientMenu and, maybe, add specific preferences.<br>
<br>
=============== Diff against Morphic-mt.1227 ===============<br>
<br>
Item was added:<br>
+ ----- Method: SystemProgressBarMorph>>barColor (in category 'accessing') -----<br>
+ barColor<br>
+<br>
+ ^ barColor!<br>
<br>
Item was added:<br>
+ ----- Method: SystemProgressBarMorph>>barColor: (in category 'accessing') -----<br>
+ barColor: aColor<br>
+<br>
+ | cc fill |<br>
+ cc := aColor.<br>
+<br>
+ MenuMorph gradientMenu<br>
+ ifFalse: [fill := SolidFillStyle color: cc]<br>
+ ifTrue: [<br>
+ fill := GradientFillStyle ramp: {<br>
+ 0.0 -> cc twiceLighter.<br>
+ 1 -> cc twiceDarker }].<br>
+<br>
+ barColor := fill.<br>
+ self changed.!<br>
<br>
Item was added:<br>
+ ----- Method: SystemProgressBarMorph>>barSize (in category 'accessing') -----<br>
+ barSize<br>
+<br>
+ ^ barSize!<br>
<br>
Item was changed:<br>
----- Method: SystemProgressBarMorph>>drawOn: (in category 'drawing') -----<br>
drawOn: aCanvas<br>
+<br>
+ | area fill |<br>
- | area |<br>
super drawOn: aCanvas.<br>
<br>
+ self barSize > 0 ifTrue: [<br>
- barSize > 0 ifTrue: [<br>
area := self innerBounds.<br>
+ area := area origin extent: (self barSize min: area extent x)@area extent y.<br>
+<br>
+ fill := self barColor isColor<br>
+ ifTrue: [SolidFillStyle color: self barColor]<br>
+ ifFalse: [self barColor].<br>
+ fill isGradientFill ifTrue: [<br>
+ fill origin: area origin.<br>
+ fill direction: 0@ area height].<br>
+<br>
+ aCanvas<br>
+ fillRectangle: area<br>
+ fillStyle: fill<br>
+ borderStyle: (SimpleBorder new width: 1; color: fill asColor muchDarker).<br>
- area := area origin extent: (barSize min: area extent x)@area extent y.<br>
- aCanvas fillRectangle: area color: barColor<br>
].<br>
!<br>
<br>
Item was changed:<br>
----- Method: SystemProgressBarMorph>>setDefaultParameters (in category 'initialization') -----<br>
setDefaultParameters<br>
"change the receiver's appareance parameters"<br>
<br>
self<br>
color: (self userInterfaceTheme color ifNil: [Color r: 0.977 g: 0.977 b: 0.977]);<br>
borderStyle: (self userInterfaceTheme borderStyle ifNil: [BorderStyle default]);<br>
borderColor: (self userInterfaceTheme borderColor ifNil: [Color transparent]);<br>
+ borderWidth: (self userInterfaceTheme borderWidth ifNil: [0]);<br>
+ barColor: (self userInterfaceTheme barColor ifNil: [Color r: 0.72 g: 0.72 b: 0.9]).!<br>
- borderWidth: (self userInterfaceTheme borderWidth ifNil: [0]).<br>
-<br>
- barColor := self userInterfaceTheme barColor ifNil: [Color r: 0.72 g: 0.72 b: 0.9].!<br>
<br>
<br>
</blockquote></div><br></div>