<div dir="ltr">I have looked at the hard coded stuff for menu3d and gradientMenu before and those methods where quite messy and had lot's of cross dependency on the preferences. <div>I hope we can untangle that with the themes so it will be less hard coded values.</div><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 4:18 PM, marcel.taeumel <span dir="ltr"><<a href="mailto:Marcel.Taeumel@hpi.de" target="_blank">Marcel.Taeumel@hpi.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Karl Ramberg wrote<br>
<span class="">> The gradientMenu stuff is pretty bad.<br>
><br>
> Best,<br>
> Karl<br>
><br>
</span>> On Wed, Aug 3, 2016 at 3:28 PM, &lt;<br>
<br>
> commits@.squeak<br>
<div><div class="h5"><br>
> &gt; wrote:<br>
><br>
>> 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.<br>
>> using gradients) in progress bars. Implementation is not perfect but<br>
>> consistent with LazyListMorph selections, now.<br>
>><br>
>> Note that, in the future, we should untangle the use of #gradientMenu<br>
>> and,<br>
>> maybe, add specific preferences.<br>
>><br>
>> =============== Diff against Morphic-mt.1227 ===============<br>
>><br>
>> Item was added:<br>
>> + ----- Method: SystemProgressBarMorph>>barColor (in category<br>
>> 'accessing')<br>
>> -----<br>
>> + barColor<br>
>> +<br>
>> + ^ barColor!<br>
>><br>
>> Item was added:<br>
>> + ----- Method: SystemProgressBarMorph>>barColor: (in category<br>
>> '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>
>> -----<br>
>> + barSize<br>
>> +<br>
>> + ^ barSize!<br>
>><br>
>> Item was changed:<br>
>> ----- Method: SystemProgressBarMorph>>drawOn: (in category 'drawing')<br>
>> -----<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<br>
>> extent<br>
>> 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:<br>
>> fill asColor muchDarker).<br>
>> - area := area origin extent: (barSize min: area extent<br>
>> x)@area extent y.<br>
>> - aCanvas fillRectangle: area color: barColor<br>
>> ].<br>
>> !<br>
>><br>
>> Item was changed:<br>
>> ----- Method: SystemProgressBarMorph>>setDefaultParameters (in category<br>
>> 'initialization') -----<br>
>> setDefaultParameters<br>
>> "change the receiver's appareance parameters"<br>
>><br>
>> self<br>
>> color: (self userInterfaceTheme color ifNil: [Color r:<br>
>> 0.977 g: 0.977 b: 0.977]);<br>
>> borderStyle: (self userInterfaceTheme borderStyle ifNil:<br>
>> [BorderStyle default]);<br>
>> borderColor: (self userInterfaceTheme borderColor ifNil:<br>
>> [Color transparent]);<br>
>> + borderWidth: (self userInterfaceTheme borderWidth ifNil:<br>
>> [0]);<br>
>> + barColor: (self userInterfaceTheme barColor ifNil: [Color<br>
>> r: 0.72 g: 0.72 b: 0.9]).!<br>
>> - borderWidth: (self userInterfaceTheme borderWidth ifNil:<br>
>> [0]).<br>
>> -<br>
>> - barColor := self userInterfaceTheme barColor ifNil: [Color r:<br>
>> 0.72<br>
>> g: 0.72 b: 0.9].!<br>
>><br>
>><br>
>><br>
<br>
</div></div>Can you please elaborate on this comment? :-)<br>
<br>
Best,<br>
Marcel<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://forum.world.st/The-Trunk-Morphic-mt-1228-mcz-tp4909399p4909424.html" rel="noreferrer" target="_blank">http://forum.world.st/The-Trunk-Morphic-mt-1228-mcz-tp4909399p4909424.html</a><br>
Sent from the Squeak - Dev mailing list archive at Nabble.com.<br>
<br>
</blockquote></div><br></div>