1 ! Copyright (C) 2016 Nicolas PĂ©net.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: assocs fry hashtables help.stylesheet help.tips io.styles
4 kernel listener namespaces prettyprint.stylesheet sequences
5 ui.theme ui.tools.listener vocabs.prettyprint words ;
8 : (update-style) ( style color elt -- )
9 '[ _ _ rot ?set-at ] change-global ;
11 : update-stylesheet ( -- )
14 default-span-style text-color foreground (update-style)
15 link-style link-color foreground (update-style)
16 title-style title-color foreground (update-style)
17 help-path-style help-path-border-color table-border (update-style)
18 heading-style heading-color foreground (update-style)
19 snippet-style snippet-color foreground (update-style)
20 code-style code-background-color page-color (update-style)
21 output-style output-color foreground (update-style)
22 url-style link-color foreground (update-style)
23 warning-style warning-background-color page-color (update-style)
24 warning-style warning-border-color border-color (update-style)
25 deprecated-style deprecated-background-color page-color (update-style)
26 deprecated-style deprecated-border-color border-color (update-style)
27 table-style table-border-color table-border (update-style)
30 tip-of-the-day-style tip-background-color page-color (update-style)
33 listener-input-style text-color foreground (update-style)
34 listener-word-style text-color foreground (update-style)
36 ! prettyprint.stylesheet
37 { POSTPONE: USING: POSTPONE: USE: POSTPONE: IN: }
38 [ "word-style" word-prop [ dim-color foreground ] dip set-at ] each
39 base-word-style text-color foreground (update-style)
40 highlighted-word-style highlighted-word-color foreground (update-style)
41 base-string-style string-color foreground (update-style)
42 base-vocab-style dim-color foreground (update-style)
43 stack-effect-style stack-effect-color foreground (update-style)
46 prompt-style prompt-background-color background (update-style)
47 prompt-style text-color foreground (update-style)
50 manifest-style vocab-background-color page-color (update-style)
51 manifest-style vocab-border-color border-color (update-style) ;
54 light-theme theme set-global update-stylesheet ;
57 dark-theme theme set-global update-stylesheet ;