The Trunk: Morphic-mt.1228.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Morphic-mt.1228.mcz

commits-2
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].!


Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Morphic-mt.1228.mcz

Karl Ramberg
The gradientMenu stuff is pretty bad.

Best,
Karl

On Wed, Aug 3, 2016 at 3:28 PM, <[hidden email]> 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].!





Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Morphic-mt.1228.mcz

marcel.taeumel
Karl Ramberg wrote
The gradientMenu stuff is pretty bad.

Best,
Karl

On Wed, Aug 3, 2016 at 3:28 PM, <[hidden email]> 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
Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Morphic-mt.1228.mcz

Karl Ramberg
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. 
I hope we can untangle that with the themes so it will be less hard coded values.

Best,
Karl

On Wed, Aug 3, 2016 at 4:18 PM, marcel.taeumel <[hidden email]> wrote:
Karl Ramberg wrote
> The gradientMenu stuff is pretty bad.
>
> Best,
> Karl
>
> On Wed, Aug 3, 2016 at 3:28 PM, &lt;

> commits@.squeak

> &gt; 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.