[squeak-dev] Re: The Trunk: Morphic-mt.1228.mcz
marcel.taeumel
Marcel.Taeumel at hpi.de
Wed Aug 3 14:18:55 UTC 2016
Karl Ramberg wrote
> The gradientMenu stuff is pretty bad.
>
> Best,
> Karl
>
> On Wed, Aug 3, 2016 at 3:28 PM, <
> commits at .squeak
> > wrote:
>
>> Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
>> http://source.squeak.org/trunk/Morphic-mt.1228.mcz
>>
>> ==================== Summary ====================
>>
>> Name: Morphic-mt.1228
>> Author: mt
>> Time: 3 August 2016, 3:28:25.722418 pm
>> UUID: 24a39e09-443b-0b41-8d8d-3bd49125fe20
>> Ancestors: Morphic-mt.1227
>>
>> 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.
>>
>> Note that, in the future, we should untangle the use of #gradientMenu
>> and,
>> maybe, add specific preferences.
>>
>> =============== Diff against Morphic-mt.1227 ===============
>>
>> Item was added:
>> + ----- Method: SystemProgressBarMorph>>barColor (in category
>> 'accessing')
>> -----
>> + barColor
>> +
>> + ^ barColor!
>>
>> Item was added:
>> + ----- Method: SystemProgressBarMorph>>barColor: (in category
>> 'accessing') -----
>> + barColor: aColor
>> +
>> + | cc fill |
>> + cc := aColor.
>> +
>> + MenuMorph gradientMenu
>> + ifFalse: [fill := SolidFillStyle color: cc]
>> + ifTrue: [
>> + fill := GradientFillStyle ramp: {
>> + 0.0 -> cc twiceLighter.
>> + 1 -> cc twiceDarker }].
>> +
>> + barColor := fill.
>> + self changed.!
>>
>> Item was added:
>> + ----- Method: SystemProgressBarMorph>>barSize (in category 'accessing')
>> -----
>> + barSize
>> +
>> + ^ barSize!
>>
>> Item was changed:
>> ----- Method: SystemProgressBarMorph>>drawOn: (in category 'drawing')
>> -----
>> drawOn: aCanvas
>> +
>> + | area fill |
>> - | area |
>> super drawOn: aCanvas.
>>
>> + self barSize > 0 ifTrue: [
>> - barSize > 0 ifTrue: [
>> area := self innerBounds.
>> + area := area origin extent: (self barSize min: area
>> extent
>> x)@area extent y.
>> +
>> + fill := self barColor isColor
>> + ifTrue: [SolidFillStyle color: self barColor]
>> + ifFalse: [self barColor].
>> + fill isGradientFill ifTrue: [
>> + fill origin: area origin.
>> + fill direction: 0@ area height].
>> +
>> + aCanvas
>> + fillRectangle: area
>> + fillStyle: fill
>> + borderStyle: (SimpleBorder new width: 1; color:
>> fill asColor muchDarker).
>> - area := area origin extent: (barSize min: area extent
>> x)@area extent y.
>> - aCanvas fillRectangle: area color: barColor
>> ].
>> !
>>
>> Item was changed:
>> ----- Method: SystemProgressBarMorph>>setDefaultParameters (in category
>> 'initialization') -----
>> setDefaultParameters
>> "change the receiver's appareance parameters"
>>
>> self
>> color: (self userInterfaceTheme color ifNil: [Color r:
>> 0.977 g: 0.977 b: 0.977]);
>> borderStyle: (self userInterfaceTheme borderStyle ifNil:
>> [BorderStyle default]);
>> borderColor: (self userInterfaceTheme borderColor ifNil:
>> [Color transparent]);
>> + borderWidth: (self userInterfaceTheme borderWidth ifNil:
>> [0]);
>> + barColor: (self userInterfaceTheme barColor ifNil: [Color
>> r: 0.72 g: 0.72 b: 0.9]).!
>> - borderWidth: (self userInterfaceTheme borderWidth ifNil:
>> [0]).
>> -
>> - barColor := self userInterfaceTheme barColor ifNil: [Color r:
>> 0.72
>> g: 0.72 b: 0.9].!
>>
>>
>>
Can you please elaborate on this comment? :-)
Best,
Marcel
--
View this message in context: http://forum.world.st/The-Trunk-Morphic-mt-1228-mcz-tp4909399p4909424.html
Sent from the Squeak - Dev mailing list archive at Nabble.com.
More information about the Squeak-dev
mailing list
|