From: nicolas-p Date: Fri, 6 May 2016 05:45:44 +0000 (+0200) Subject: Added prompt style and tip style in switching X-Git-Tag: unmaintained~1057 X-Git-Url: https://gitweb.factorcode.org/gitweb.cgi?p=factor.git;a=commitdiff_plain;h=94d9bf8c88722b456cfa12d16d1615b046f4683e Added prompt style and tip style in switching --- diff --git a/basis/listener/listener.factor b/basis/listener/listener.factor index 067cf0636e..0e21e98068 100644 --- a/basis/listener/listener.factor +++ b/basis/listener/listener.factor @@ -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 ; diff --git a/basis/ui/gadgets/theme/switching/switching.factor b/basis/ui/gadgets/theme/switching/switching.factor index 5dd9e90bda..2a4918bb9e 100644 --- a/basis/ui/gadgets/theme/switching/switching.factor +++ b/basis/ui/gadgets/theme/switching/switching.factor @@ -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 ;