changing window and font colors

Ned Konz ned at bike-nomad.com
Mon Oct 28 05:40:24 UTC 2002


On Sunday 27 October 2002 02:19 pm, Michael Vanier wrote:
> Ned,
>
> This is cool, but unfortunately it changes text in message balloons
> too. What I'd like is to be able to independently set the text
> color just for (say) workspaces or browsers.  Ditto for background
> colors.  I assume this will involve hacking the code for
> workspaces/browsers, but I have been unable to figure out how
> either of these get their colors.  It must be doable independently
> because, for instance, transcript windows have different colors
> than workspaces.

They're the same color. That is, they don't have different text 
colors, just background colors, which are quite different.

The problem is that the PluggableTextMorph and PluggableListMorph that 
form the basis of most of the built-in tools don't specify a text 
color. So you get whatever the default is for StringMorph or 
TextMorph, which is black.

If you wanted a per-tool setting, you'd have to make the Browser set 
all of its parts' text color, and then you'd have to make PTM and PLM 
listen to that color, rather than using the default.

You know, I assume, that you can change the background colors for the 
various tools using the menu item "appearance/window colors" (though 
you may have to turn off the #alternativeWindowLook preference to get 
the colors you asked for).

I guess another strategy would be to have SystemWindow examine the 
global color preferences like it does for background colors, and set 
the text colors. There would still be some changes needed (hint: 
search for senders of "black"), like the PLM change I made to 
unhighlight.

-- 
Ned Konz
http://bike-nomad.com
GPG key ID: BEEA7EFE




More information about the Squeak-dev mailing list