]> gitweb.factorcode.org Git - factor.git/commitdiff
Added prompt style and tip style in switching
authornicolas-p <z.nicolas@gmail.com>
Fri, 6 May 2016 05:45:44 +0000 (07:45 +0200)
committerJohn Benediktsson <mrjbq7@gmail.com>
Tue, 10 May 2016 04:40:56 +0000 (21:40 -0700)
basis/listener/listener.factor
basis/ui/gadgets/theme/switching/switching.factor

index 067cf0636eb9c43b85b286297be9822beca7e953..0e21e980686954bad548fa34c06317d045d41743 100644 (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 ;
index 5dd9e90bdaf7e690de482f89cfc7183af6dd8ebd..2a4918bb9e8a76ee5df4f637ee1dd9dad3fb9a50 100644 (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 ;