204
|
1 |
You may think this is too heavy ...
|
|
2 |
... but I love those styles ;-)
|
|
3 |
|
|
4 |
|
|
5 |
This directory contains various style sheets which are read
|
|
6 |
and used when the view style is changed (via View>>defaultStyle:).
|
|
7 |
|
|
8 |
Look into generic.style, to see which parameters can be changed
|
|
9 |
and how they are named.
|
|
10 |
|
|
11 |
There are still some places in the system, where style information is
|
|
12 |
programmed into (instead of controlled via the StyleSheet) - but these
|
2306
|
13 |
will be removed over time (these are historical leftovers).
|
204
|
14 |
So be prepared, that some things are not fully working.
|
|
15 |
|
2306
|
16 |
Do not modify the original style files - but instead create your own.
|
204
|
17 |
Styles are read using the same path mechanism as all other file accesses,
|
|
18 |
so you can put your private style-files into your private directories,
|
|
19 |
even in case a public file exists with the same name.
|
|
20 |
|
|
21 |
You can inherit other styles via a #include - see 'motifXXX.style' as
|
|
22 |
an example.
|
|
23 |
|
|
24 |
To get your new style, perform the following steps:
|
|
25 |
|
|
26 |
1. create a styleSheet, say 'foo.style'
|
|
27 |
(take any existing to start with and see 'generic.style'
|
|
28 |
for more comments)
|
|
29 |
|
|
30 |
2. make sure its accessable under any 'resources' directory
|
|
31 |
of your systemPath.
|
|
32 |
(for the development environment, there is a rule 'make styles'
|
|
33 |
in the 'projects/smalltalk/Makefile', which symlinks all styles
|
|
34 |
to the local directory).
|
|
35 |
|
|
36 |
3. check it by evaluating: 'View defaultStyle:#foo' in
|
309
|
37 |
a workspace (or change the style setting in the Launcher)
|
|
38 |
. Try some NEW views
|
204
|
39 |
(the new style will affect only new views).
|
|
40 |
|
|
41 |
Notice, that the styleSheet is only re-read if the style
|
|
42 |
has changed (the contents is cached to avoid reading the style
|
|
43 |
files over and over again). Thus, to get an updated styleSheet to be
|
|
44 |
used, either switch temporary to another style and back, or
|
|
45 |
use 'View updateAllStyleCaches' to force rereading of the current
|
|
46 |
style.
|
|
47 |
|
|
48 |
4. if your style is ok and you want it to become your default at startup,
|
|
49 |
add the above line (View defaultStyle:#foo) to your 'private.rc' file.
|
|
50 |
It will then be automatically installed at startup time.
|
|
51 |
|
|
52 |
|
|
53 |
A note on the existing styles:
|
|
54 |
|
309
|
55 |
Most are included as demo and to give you a starting point.
|
2306
|
56 |
Many are not really usable for ergonomic reasons.
|
204
|
57 |
You may want to try your own, by combining features from different styles.
|
309
|
58 |
For example, if you think the #st80-style may look good combined with green-background
|
204
|
59 |
text-selection hilighting; go ahead and create your own.
|
|
60 |
|
309
|
61 |
Disclaimer:
|
204
|
62 |
It is neither intended, nor do I claim, that these styleSheets mimic the
|
|
63 |
originals exactly, they are included for fun and to make your ST/X views
|
|
64 |
integrate better into whatever your environment may look like.
|
309
|
65 |
|
204
|
66 |
You may improve them and send me back your updated files ....
|
|
67 |
... that way, the next release will have more and/ore better styleSheets.
|
|
68 |
|
|
69 |
|
|
70 |
No, I do not intent to extent this mechanism the Xt way, where every
|
|
71 |
individual component can be specified ... (actually, I do not like it).
|
|
72 |
It could be easily done, by reading the Xresource files (a naming hierarchy
|
|
73 |
is already present in the views). But it either tends to make
|
|
74 |
your display look very ugly and colorful, or it is not used by serious
|
|
75 |
users. So what ?
|
|
76 |
|
|
77 |
Most users prefer simple (unspectacular) styles; the most attractive being
|
309
|
78 |
the iris, motif, os2 and normal (for monochrome displays) styles.
|
204
|
79 |
|
|
80 |
TODO:
|
|
81 |
The new ViewStyle supports entries of the form:
|
|
82 |
className.styleVariable ...
|
|
83 |
which makes the whole style definition easier to understand,
|
|
84 |
and allows the style-code to be simplified.
|
|
85 |
The style sheets will be changed till the next version to reflect
|
|
86 |
this. Be prepared for this.
|