Added prompt style and tip style in switching

locals-and-roots
nicolas-p 2016-05-06 07:45:44 +02:00 committed by John Benediktsson
parent d2e645b5a2
commit 94d9bf8c88
2 changed files with 13 additions and 7 deletions

View File

@ -15,11 +15,14 @@ GENERIC# prompt. 1 ( stream prompt -- )
manifest get current-vocab>> [ name>> "IN: " prepend ] [ "" ] if*
auto-use? get [ " auto-use" append ] when ;
SYMBOL: prompt-style
H{
{ background $ prompt-background-color }
{ foreground $ text-color }
} prompt-style set-global
M: object prompt.
nip H{
{ background $ prompt-background-color }
{ foreground $ text-color }
} format bl flush ;
nip prompt-style get-global format bl flush ;
: parse-lines-interactive ( lines -- quot/f )
[ parse-lines ] with-compilation-unit ;

View File

@ -1,7 +1,7 @@
! Copyright (C) 2016 Nicolas Pénet.
! See http://factorcode.org/license.txt for BSD license.
USING: fry hashtables help.stylesheet io.styles kernel
namespaces ui.gadgets.theme ;
USING: fry hashtables help.stylesheet help.tips io.styles
kernel listener namespaces ui.gadgets.theme ;
IN: ui.gadgets.theme.switching
: (update-style) ( style color elt -- )
@ -18,7 +18,10 @@ IN: ui.gadgets.theme.switching
url-style url-color foreground (update-style)
warning-style warning-background-color page-color (update-style)
deprecated-style warning-background-color page-color (update-style)
table-style line-color table-border (update-style) ;
table-style line-color table-border (update-style)
prompt-style prompt-background-color background (update-style)
prompt-style text-color foreground (update-style)
tip-of-the-day-style tip-background-color page-color (update-style) ;
: light-mode ( -- ) light-theme theme set-global update-stylesheet ;
: dark-mode ( -- ) dark-theme theme set-global update-stylesheet ;