Most Smalltalk UI's (in fact, most UI's in general) tend to look a bit bland. In recent years, It's become more popular to draw color gradients to make the UI's look more interesting. I thought I'd give this a try in Pollock to see what it would look like.
First off, here's what the final result looks like:
The picture is a little munged by JPEG artifacts, but you get the idea.
To do this, I created a new Gradient pane and a GradientArtist to draw it. You set up a Gradient pane like this:
gradient := Gradient
from: 0.0
color: ColorValue white
to: 1.0
color: (ColorValue red: 0.5 green: 0.5 blue: 1.0)
direction: #vertical
The Gradient class is pretty simple - it just specifies the GradientArtist as the artist and has some plumbing to delegate the important messages off to the artist.
The GradientArtist has a displayOn: method and a few helper methods to get the job done. Overall, it's pretty simple. Some of the calculations need to access the clipping bounds which is the only slightly complicated bit.
If you want to try it out, connect to the Cincom public store repository and download the package GradientBackground. There's a sample UI you can try out. Just run: GradientTestUI open.