ui.theme.switching: add a switch-theme word.
parent
d00e986b3d
commit
26e26599bd
|
@ -5,53 +5,53 @@ kernel listener namespaces prettyprint.stylesheet sequences
|
||||||
ui.theme ui.tools.listener vocabs.prettyprint words ;
|
ui.theme ui.tools.listener vocabs.prettyprint words ;
|
||||||
IN: ui.theme.switching
|
IN: ui.theme.switching
|
||||||
|
|
||||||
: (update-style) ( style color elt -- )
|
<PRIVATE
|
||||||
|
|
||||||
|
: update-style ( style color elt -- )
|
||||||
'[ _ _ rot ?set-at ] change-global ;
|
'[ _ _ rot ?set-at ] change-global ;
|
||||||
|
|
||||||
: update-stylesheet ( -- )
|
: update-stylesheet ( -- )
|
||||||
|
|
||||||
! help.stylesheet
|
! help.stylesheet
|
||||||
default-span-style text-color foreground (update-style)
|
default-span-style text-color foreground update-style
|
||||||
link-style link-color foreground (update-style)
|
link-style link-color foreground update-style
|
||||||
title-style title-color foreground (update-style)
|
title-style title-color foreground update-style
|
||||||
help-path-style help-path-border-color table-border (update-style)
|
help-path-style help-path-border-color table-border update-style
|
||||||
heading-style heading-color foreground (update-style)
|
heading-style heading-color foreground update-style
|
||||||
snippet-style snippet-color foreground (update-style)
|
snippet-style snippet-color foreground update-style
|
||||||
code-style code-background-color page-color (update-style)
|
code-style code-background-color page-color update-style
|
||||||
output-style output-color foreground (update-style)
|
output-style output-color foreground update-style
|
||||||
url-style link-color foreground (update-style)
|
url-style link-color foreground update-style
|
||||||
warning-style warning-background-color page-color (update-style)
|
warning-style warning-background-color page-color update-style
|
||||||
warning-style warning-border-color border-color (update-style)
|
warning-style warning-border-color border-color update-style
|
||||||
deprecated-style deprecated-background-color page-color (update-style)
|
deprecated-style deprecated-background-color page-color update-style
|
||||||
deprecated-style deprecated-border-color border-color (update-style)
|
deprecated-style deprecated-border-color border-color update-style
|
||||||
table-style table-border-color table-border (update-style)
|
table-style table-border-color table-border update-style
|
||||||
|
|
||||||
! help.tips
|
! help.tips
|
||||||
tip-of-the-day-style tip-background-color page-color (update-style)
|
tip-of-the-day-style tip-background-color page-color update-style
|
||||||
|
|
||||||
! ui.tools.listener
|
! ui.tools.listener
|
||||||
listener-input-style text-color foreground (update-style)
|
listener-input-style text-color foreground update-style
|
||||||
listener-word-style text-color foreground (update-style)
|
listener-word-style text-color foreground update-style
|
||||||
|
|
||||||
! prettyprint.stylesheet
|
! prettyprint.stylesheet
|
||||||
{ POSTPONE: USING: POSTPONE: USE: POSTPONE: IN: }
|
{ POSTPONE: USING: POSTPONE: USE: POSTPONE: IN: }
|
||||||
[ "word-style" word-prop [ dim-color foreground ] dip set-at ] each
|
[ "word-style" word-prop [ dim-color foreground ] dip set-at ] each
|
||||||
base-word-style text-color foreground (update-style)
|
base-word-style text-color foreground update-style
|
||||||
highlighted-word-style highlighted-word-color foreground (update-style)
|
highlighted-word-style highlighted-word-color foreground update-style
|
||||||
base-string-style string-color foreground (update-style)
|
base-string-style string-color foreground update-style
|
||||||
base-vocab-style dim-color foreground (update-style)
|
base-vocab-style dim-color foreground update-style
|
||||||
stack-effect-style stack-effect-color foreground (update-style)
|
stack-effect-style stack-effect-color foreground update-style
|
||||||
|
|
||||||
! listener
|
! listener
|
||||||
prompt-style prompt-background-color background (update-style)
|
prompt-style prompt-background-color background update-style
|
||||||
prompt-style text-color foreground (update-style)
|
prompt-style text-color foreground update-style
|
||||||
|
|
||||||
! vocabs.prettyprint
|
! vocabs.prettyprint
|
||||||
manifest-style vocab-background-color page-color (update-style)
|
manifest-style vocab-background-color page-color update-style
|
||||||
manifest-style vocab-border-color border-color (update-style) ;
|
manifest-style vocab-border-color border-color update-style ;
|
||||||
|
|
||||||
: light-mode ( -- )
|
PRIVATE>
|
||||||
light-theme theme set-global update-stylesheet ;
|
|
||||||
|
|
||||||
: dark-mode ( -- )
|
: switch-theme ( theme -- )
|
||||||
dark-theme theme set-global update-stylesheet ;
|
theme set-global update-stylesheet ;
|
||||||
|
|
Loading…
Reference in New Issue