[squeak-dev] Re: Possible Background fix

Mirko Kapps mirkok.lists at googlemail.com
Sat Jan 22 18:54:39 UTC 2011


On 22.01.2011 17:46, Juan Vuletich wrote:
> Mirko Kapps wrote:
>> Hi Juan.
>>
>> My original idea of moving all really appearance related things
>> into a DefaultTheme proved to be a little to complex and difficult
>> for me. So, I decided to not mess around with this and just try to
>> fix the background thing. What I came up with is a test whether a
>> Theme defines #background and only then set the background using a
>> new Theme class method #setBackground: . It's more of a hack than
>> a real fix, I think, and it breaks subclassing somewhat. A theme
>> *has* to define #background if it wants to set one, even if just
>> the one from the super class. I personally rather like the
>> behaviour, but decide you if it's OK.
>>
>> The added #setBackground: method has also the nice advantage that
>> it is now really easy to set a background manually. It's just:
>>
>> Theme setBackground: Color blue
>> Theme setBackground: '/home/mirko/Bilder/jungle_maze.jpg'
>>
>> Hope it's of some use. :-)
>>
>> ChangeSet attached.
>>
>> Kindest Regards
>> Mirko
>
> Thank you!
>
> Will be integrated in next release (although maybe I tweak it a bit).
>
> Cheers,
> Juan Vuletich
>

Great! My first contribution. :-D
Hopefully you'll see more to follow.

Thanks!



More information about the Squeak-dev mailing list