Possible Background fix (was: Re: [squeak-dev] Cuis 3, some beginner
questions)
Mirko Kapps
mirkok.lists at googlemail.com
Sat Jan 22 15:23:13 UTC 2011
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Theme-Background.cs
Type: text/x-csharp
Size: 934 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20110122/dddbd573/Theme-Background.bin
More information about the Squeak-dev
mailing list
|