On 02 May 2015, at 10:05, phil@highoctane.be wrote:


Le 2 mai 2015 09:45, "Esteban Lorenzano" <estebanlm@gmail.com> a écrit :
>
> nice.
> you will want to use the Idea icon pack with dark theme… experience is highly improved :)

Yes!

I like the exception icons a bit more "different" than "generic blueish". I'll do yellow/orange ones.

sounds good. 
if you contribute it back, I can incorporate it.

Esteban

Phil
>
> Esteban
>
> > On 02 May 2015, at 00:08, Peter Uhnák <i.uhnak@gmail.com> wrote:
> >
> > Hi,
> >
> > since I wanted to use DarkTheme I played around with TRMorph (since seeing giant white rectangle in dark theme is not very nice).
> >
> > What I have done is moved the background color setting to `surface clear:` (instead of the original aCanvas fillRectangle).
> >
> > And then if theme background luminance is dark (>0.5), I invert all the colors in the visualization.
> > For dark theme the background is black, and not the theme background - at least to me it seems that black is much clearer.
> >
> > Is this something that could be incorporated?
> >
> > <2015-05-02_00:05:11.png>
> > ​
> >
> > And the modified code:
> > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > "protocol: drawing"
> > TRMorph>>drawOn: aCanvas
> >       "aCanvas is a FormCanvas"
> >
> >       self checkSession.
> >
> >       "aCanvas fillRectangle: bounds color: trachelCanvas color."
> >       trachelCanvas playAnimations.
> >
> >       "The drawing has to be done when a change in the shapes occured or when there is an animation."
> >       surface drawDuring: [:cs |
> >               surface clear: trachelCanvas color.
> >
> >               "We display the elements that are subject to the camera"
> >               cs pathTransform
> >                       translateBy: (self extent / 2) asFloatPoint;
> >                           scaleBy: trachelCanvas camera scale asFloat;
> >                       translateBy: trachelCanvas camera position negated asFloatPoint.
> >               trachelCanvas shapes do: [ :trachelShape |
> >                       trachelShape drawOn: cs.
> >               ].
> >
> >               "We display the elements that are _NOT_ subject to the camera"
> >               cs pathTransform loadIdentity scaleBy: 1.001.
> >               trachelCanvas fixedShapes do: [ :trachelShape |
> >                       trachelShape drawOn: cs.
> >               ].
> >       ].
> >
> >       self theme backgroundColor luminance < 0.5 ifTrue: [
> >               surface drawDuring: [ :cs |
> >                       cs paintMode restoreAfter: [
> >                                       cs setPaint: Color white.
> >                                       cs paintMode difference.
> >                                       cs drawShape: (0 @ 0 extent: surface extent)
> >                       ]
> >               ]
> >       ].
> >
> >       "aCanvas translucentImage: surface asForm at: self bounds origin."
> >       "asForm creates a new Form, which is likely to be expensive. This can be cached"
> >       aCanvas image: surface asForm at: self bounds origin sourceRect: (0 @ 0 extent: surface extent) rule: 34.
> > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > _______________________________________________
> > Moose-dev mailing list
> > Moose-dev@iam.unibe.ch
> > https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
>
> _______________________________________________
> Moose-dev mailing list
> Moose-dev@iam.unibe.ch
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

_______________________________________________
Moose-dev mailing list
Moose-dev@iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev