2015-04-19 7:33 GMT+02:00 stepharo <[email protected]>:

>  Nicolai
>
> I will start to look at Spec and with the goal to improve the API.
> So what is a little scenario to show the API needed for this case?
>

Hi stef,

Compare this tree in Pharo 4.0 and Pharo 3.0
(TreeModel new roots:(1to:5))openWithSpec

3.0
-> different color for odd/even rows
4.0
-> always the same default color (theme backgroundColor)

(This had changed because we removed the (hard coded) call to row color in
MorphTreeModel>>#defaultTreeMorph)

How can we set the row colors when using spec tree model->
We can set the row color in the tree model with:

|t|
t:=(TreeModel new roots:(1to:5));yourself.
t oddRowColor: Color black.
t evenRowColor: Color white.
t openWithSpec.

But the result is the same, the row color isn't populated to the widget.



>
> Stef
>
> Le 18/4/15 22:08, Nicolai Hess a écrit :
>
>
>
> 2015-04-18 6:45 GMT+02:00 Damien Cassou <[email protected]>:
>
>>
>> Jan Blizničenko <[email protected]> writes:
>>
>> > In settings, there used to be option to switch off categories of image
>> > sources/templates, like hide Pharo 2 category, but this option seems to
>> be
>> > missing now.
>>
>>
>> yes, I removed it because it was too costly to maintain.
>>
>>
>> > And one more thing ... GUI has some weird colors (well, I think it is
>> > actually missing colors). Screenshot:
>> > https://monosnap.com/file/Fs6rfZTlstzqkKzyReRnPUVa28FVZe.png
>> > However, this one is not today's change, because this morning I tried
>> > updating launcher (to find out whether it supports Pharo 5 :) ) and
>> colors
>> > were already like this.
>>
>>
>> I confirm and I don't know why.
>>
>
>  This changed in pharo 40.004. Setting the rowcolor in the TreeMorph
> created by the MorphTreeModel
>  was removed (by estaban (?)), I think this was because it is bad to have
> these values hard coded in
>  the model (doesn't look nice with the dark theme :) )
>
>  The now problem is, spec tree model does not expose (or use) the api for
> setting this attributes.
>  I uploaded a workaround fix to set this property when the widget is
> built (bypassing spec).
> (PharoLauncher-Spec-NicolaiHess.41)
>
>  nicolai
>
>
>
>
>
>>
>> --
>> Damien Cassou
>> http://damiencassou.seasidehosting.st
>>
>> "Success is the ability to go from one failure to another without
>> losing enthusiasm." --Winston Churchill
>>
>>
>
>

Reply via email to