1 ! Copyright (C) 2016 Nicolas PĂ©net.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: fry hashtables help.stylesheet io.styles kernel
4 namespaces ui.gadgets.theme ;
5 IN: ui.gadgets.theme.switching
7 : (update-style) ( style color elt -- )
8 '[ _ _ rot ?set-at ] change-global ;
10 : update-stylesheet ( -- )
11 default-span-style text-color foreground (update-style)
12 link-style link-color foreground (update-style)
13 title-style title-color foreground (update-style)
14 heading-style heading-color foreground (update-style)
15 snippet-style snippet-color foreground (update-style)
16 code-style code-background-color page-color (update-style)
17 output-style output-color foreground (update-style)
18 url-style url-color foreground (update-style)
19 warning-style warning-background-color page-color (update-style)
20 deprecated-style warning-background-color page-color (update-style)
21 table-style line-color table-border (update-style) ;
23 : light-mode ( -- ) light-theme theme set-global update-stylesheet ;
24 : dark-mode ( -- ) dark-theme theme set-global update-stylesheet ;