[squeak-dev] Re: Possible Background fix

Juan Vuletich juan at jvuletich.org
Sat Jan 22 16:46:32 UTC 2011


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



More information about the Squeak-dev mailing list