[ALLY] Exploring desktop skins
From: larry:ecotope at: 23-Apr-2001 12:57
Hi all,
The next version of View will have user created skins. Most of the skin
machinery is already present in the desktop code. In fact, the desktop
window appearance is created from a default skin. Here is a quick hack which
will allow you to explore the current skin attributes. It will run OK
regardless of whether the desktop is set to come up immediately or not. You
could also provide some feedback to RT on desired features, etc.
In your user.r add the following lines of code:
; load desktop object
if block? ctx-viewtop [ctx-viewtop: context ctx-viewtop]
; make info text more visible
ctx-viewtop/dtw-skin/info-text-color: 255.180.55
; maybe you don't like the grid?
ctx-viewtop/dtw-skin/main-effect: none
The currently available skin attributes can be found with (after desktop
object is loaded)
>> print mold ctx-viewtop/dtw-skin
make object! [
main-color: 160.180.160
side-color: 100.140.100
status-color: 80.80.100
bottom-bar-color: 100.120.100
top-bar-color: 100.120.100
main-image: none
side-image: none
main-effect: none
side-effect: [gradient 0x1 200.220.200 100.120.100]
base-text-color: 0.0.0
over-text-color: 140.20.20
info-text-color: 255.180.55
]
Main refers to the default folder window, side refers to the default
bookmark sidebar, top is the default services bar.
How it works
User.r is executed before the desktop is created. The desktop comes
originally as an object spec code block called ctx-viewtop. We need to load
this block into an object so that we can use it. The object is given the
same name, which allows the GC to free up the memory used by the block.
Afterwards, whatever changes are made to the dtw-skin object will be
reflected whenever the desktop comes up.
One negative feature of this method is an increase of about 300kB in the
memory image and a small amount of time to load the object, even when the
desktop is not invoked (e.g. when running a local script). Remember it's
just a quick hack.
Enjoy (and be sure to send your comments)
-Larry