]> gitweb.factorcode.org Git - factor.git/commitdiff
ui.theme: updates to color scheme.
authorJohn Benediktsson <mrjbq7@gmail.com>
Tue, 10 May 2016 04:34:31 +0000 (21:34 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Tue, 10 May 2016 04:40:56 +0000 (21:40 -0700)
Fixes circularity and adds theme switching to Mac menu.
Could use some simplification and reduction in color theme hooks.

28 files changed:
Factor.app/Contents/Resources/English.lproj/Factor.nib/classes.nib [deleted file]
Factor.app/Contents/Resources/English.lproj/Factor.nib/designable.nib [new file with mode: 0644]
Factor.app/Contents/Resources/English.lproj/Factor.nib/info.nib [deleted file]
Factor.app/Contents/Resources/English.lproj/Factor.nib/keyedobjects.nib
basis/help/stylesheet/stylesheet.factor
basis/help/tips/tips-docs.factor
basis/listener/listener.factor
basis/prettyprint/stylesheet/stylesheet.factor
basis/ui/backend/cocoa/tools/tools.factor
basis/ui/gadgets/labels/labels.factor
basis/ui/gadgets/line-support/line-support.factor
basis/ui/gadgets/menus/menus.factor
basis/ui/gadgets/panes/panes.factor
basis/ui/gadgets/presentations/presentations.factor
basis/ui/gadgets/status-bar/status-bar.factor
basis/ui/gadgets/tables/tables.factor
basis/ui/gadgets/theme/theme.factor
basis/ui/theme/switching/switching.factor
basis/ui/theme/theme.factor
basis/ui/tools/browser/browser.factor
basis/ui/tools/browser/popups/popups.factor
basis/ui/tools/common/common.factor
basis/ui/tools/debugger/debugger.factor
basis/ui/tools/inspector/inspector.factor
basis/ui/tools/listener/completion/completion.factor
basis/ui/tools/listener/listener.factor
basis/ui/tools/traceback/traceback.factor
basis/vocabs/prettyprint/prettyprint.factor

diff --git a/Factor.app/Contents/Resources/English.lproj/Factor.nib/classes.nib b/Factor.app/Contents/Resources/English.lproj/Factor.nib/classes.nib
deleted file mode 100644 (file)
index 6a6eedf..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-       <key>IBClasses</key>
-       <array>
-               <dict>
-                       <key>ACTIONS</key>
-                       <dict>
-                               <key>factorBrowser</key>
-                               <string>id</string>
-                               <key>factorListener</key>
-                               <string>id</string>
-                               <key>newFactorBrowser</key>
-                               <string>id</string>
-                               <key>newFactorListener</key>
-                               <string>id</string>
-                               <key>refreshAll</key>
-                               <string>id</string>
-                               <key>runFactorFile</key>
-                               <string>id</string>
-                               <key>saveFactorImage</key>
-                               <string>id</string>
-                               <key>saveFactorImageAs</key>
-                               <string>id</string>
-                       </dict>
-                       <key>CLASS</key>
-                       <string>FirstResponder</string>
-                       <key>LANGUAGE</key>
-                       <string>ObjC</string>
-                       <key>SUPERCLASS</key>
-                       <string>NSObject</string>
-               </dict>
-       </array>
-       <key>IBVersion</key>
-       <string>1</string>
-</dict>
-</plist>
diff --git a/Factor.app/Contents/Resources/English.lproj/Factor.nib/designable.nib b/Factor.app/Contents/Resources/English.lproj/Factor.nib/designable.nib
new file mode 100644 (file)
index 0000000..74aa019
--- /dev/null
@@ -0,0 +1,282 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="10116" systemVersion="15E65" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none">
+    <dependencies>
+        <deployment version="1050" identifier="macosx"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="10116"/>
+    </dependencies>
+    <objects>
+        <customObject id="-2" userLabel="File's Owner" customClass="NSApplication"/>
+        <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
+        <customObject id="-3" userLabel="Application" customClass="NSObject"/>
+        <menu title="Factor.app:Contents:Resources:English.lproj:MenuBar" systemMenu="main" id="29" userLabel="MainMenu">
+            <items>
+                <menuItem title="Factor" id="56">
+                    <menu key="submenu" title="Factor" systemMenu="apple" id="57">
+                        <items>
+                            <menuItem title="About Factor" id="58">
+                                <modifierMask key="keyEquivalentModifierMask"/>
+                                <connections>
+                                    <action selector="orderFrontStandardAboutPanel:" target="-2" id="142"/>
+                                </connections>
+                            </menuItem>
+                            <menuItem isSeparatorItem="YES" id="236">
+                                <modifierMask key="keyEquivalentModifierMask" command="YES"/>
+                            </menuItem>
+                            <menuItem title="Run Factor Source…" keyEquivalent="o" id="366">
+                                <modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
+                                <connections>
+                                    <action selector="runFactorFile:" target="-1" id="rgF-Ks-Gn8"/>
+                                </connections>
+                            </menuItem>
+                            <menuItem title="Save Factor Image" keyEquivalent="s" id="368">
+                                <modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
+                                <connections>
+                                    <action selector="saveFactorImage:" target="-1" id="Iu7-Jk-Gn3"/>
+                                </connections>
+                            </menuItem>
+                            <menuItem title="Save Factor Image As…" keyEquivalent="S" id="369">
+                                <modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
+                                <connections>
+                                    <action selector="saveFactorImageAs:" target="-1" id="YdH-jx-wV1"/>
+                                </connections>
+                            </menuItem>
+                            <menuItem isSeparatorItem="YES" id="365"/>
+                            <menuItem title="Services" id="131">
+                                <menu key="submenu" title="Services" systemMenu="services" id="130"/>
+                            </menuItem>
+                            <menuItem isSeparatorItem="YES" id="144">
+                                <modifierMask key="keyEquivalentModifierMask" command="YES"/>
+                            </menuItem>
+                            <menuItem title="Hide Factor" keyEquivalent="h" id="134">
+                                <connections>
+                                    <action selector="hide:" target="-2" id="152"/>
+                                </connections>
+                            </menuItem>
+                            <menuItem title="Hide Others" keyEquivalent="h" id="145">
+                                <modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
+                                <connections>
+                                    <action selector="hideOtherApplications:" target="-2" id="146"/>
+                                </connections>
+                            </menuItem>
+                            <menuItem title="Show All" id="150">
+                                <connections>
+                                    <action selector="unhideAllApplications:" target="-2" id="153"/>
+                                </connections>
+                            </menuItem>
+                            <menuItem isSeparatorItem="YES" id="149">
+                                <modifierMask key="keyEquivalentModifierMask" command="YES"/>
+                            </menuItem>
+                            <menuItem title="Quit Factor" keyEquivalent="q" id="136">
+                                <connections>
+                                    <action selector="terminate:" target="-2" id="139"/>
+                                </connections>
+                            </menuItem>
+                        </items>
+                    </menu>
+                </menuItem>
+                <menuItem title="File" id="343">
+                    <modifierMask key="keyEquivalentModifierMask"/>
+                    <menu key="submenu" title="File" id="344">
+                        <items>
+                            <menuItem title="New" keyEquivalent="n" id="345">
+                                <connections>
+                                    <action selector="newDocument:" target="-1" id="358"/>
+                                </connections>
+                            </menuItem>
+                            <menuItem title="Open…" keyEquivalent="o" id="346">
+                                <connections>
+                                    <action selector="openDocument:" target="-1" id="359"/>
+                                </connections>
+                            </menuItem>
+                            <menuItem isSeparatorItem="YES" id="348"/>
+                            <menuItem title="Close" keyEquivalent="w" id="349">
+                                <connections>
+                                    <action selector="performClose:" target="-1" id="360"/>
+                                </connections>
+                            </menuItem>
+                            <menuItem title="Save" keyEquivalent="s" id="350">
+                                <connections>
+                                    <action selector="saveDocument:" target="-1" id="361"/>
+                                </connections>
+                            </menuItem>
+                            <menuItem title="Save As…" keyEquivalent="S" id="351">
+                                <connections>
+                                    <action selector="saveDocumentAs:" target="-1" id="362"/>
+                                </connections>
+                            </menuItem>
+                            <menuItem title="Revert" id="352">
+                                <modifierMask key="keyEquivalentModifierMask"/>
+                                <connections>
+                                    <action selector="revertDocumentToSaved:" target="-1" id="363"/>
+                                </connections>
+                            </menuItem>
+                        </items>
+                    </menu>
+                </menuItem>
+                <menuItem title="Edit" id="304">
+                    <menu key="submenu" title="Edit" id="305">
+                        <items>
+                            <menuItem title="Undo" keyEquivalent="z" id="306">
+                                <connections>
+                                    <action selector="undo:" target="-1" id="332"/>
+                                </connections>
+                            </menuItem>
+                            <menuItem title="Redo" keyEquivalent="Z" id="307">
+                                <connections>
+                                    <action selector="redo:" target="-1" id="333"/>
+                                </connections>
+                            </menuItem>
+                            <menuItem isSeparatorItem="YES" id="308">
+                                <modifierMask key="keyEquivalentModifierMask" command="YES"/>
+                            </menuItem>
+                            <menuItem title="Cut" keyEquivalent="x" id="309">
+                                <connections>
+                                    <action selector="cut:" target="-1" id="341"/>
+                                </connections>
+                            </menuItem>
+                            <menuItem title="Copy" keyEquivalent="c" id="310">
+                                <connections>
+                                    <action selector="copy:" target="-1" id="335"/>
+                                </connections>
+                            </menuItem>
+                            <menuItem title="Paste" keyEquivalent="v" id="311">
+                                <connections>
+                                    <action selector="paste:" target="-1" id="336"/>
+                                </connections>
+                            </menuItem>
+                            <menuItem title="Delete" id="313">
+                                <connections>
+                                    <action selector="delete:" target="-1" id="337"/>
+                                </connections>
+                            </menuItem>
+                            <menuItem title="Select All" keyEquivalent="a" id="314">
+                                <connections>
+                                    <action selector="selectAll:" target="-1" id="338"/>
+                                </connections>
+                            </menuItem>
+                            <menuItem isSeparatorItem="YES" id="315">
+                                <modifierMask key="keyEquivalentModifierMask" command="YES"/>
+                            </menuItem>
+                            <menuItem title="Find" id="316">
+                                <menu key="submenu" title="Find" id="326">
+                                    <items>
+                                        <menuItem title="Find…" tag="1" keyEquivalent="f" id="327"/>
+                                        <menuItem title="Find Next" tag="2" keyEquivalent="g" id="328"/>
+                                        <menuItem title="Find Previous" tag="3" keyEquivalent="G" id="329"/>
+                                        <menuItem title="Use Selection for Find" tag="7" keyEquivalent="e" id="330"/>
+                                        <menuItem title="Jump to Selection" keyEquivalent="j" id="331"/>
+                                    </items>
+                                </menu>
+                            </menuItem>
+                            <menuItem title="Spelling" id="317">
+                                <menu key="submenu" title="Spelling" id="322">
+                                    <items>
+                                        <menuItem title="Spelling…" keyEquivalent=":" id="323"/>
+                                        <menuItem title="Check Spelling" keyEquivalent=";" id="324"/>
+                                        <menuItem title="Check Spelling as You Type" id="325"/>
+                                    </items>
+                                </menu>
+                            </menuItem>
+                            <menuItem title="Speech" id="318">
+                                <menu key="submenu" title="Speech" id="319">
+                                    <items>
+                                        <menuItem title="Start Speaking" id="320"/>
+                                        <menuItem title="Stop Speaking" id="321"/>
+                                    </items>
+                                </menu>
+                            </menuItem>
+                        </items>
+                    </menu>
+                </menuItem>
+                <menuItem title="Tools" id="283">
+                    <menu key="submenu" title="Tools" id="284">
+                        <items>
+                            <menuItem title="Show Listener" keyEquivalent="l" id="286">
+                                <connections>
+                                    <action selector="showFactorListener:" target="-1" id="r8I-gi-bmO"/>
+                                </connections>
+                            </menuItem>
+                            <menuItem title="New Listener" keyEquivalent="L" id="287">
+                                <modifierMask key="keyEquivalentModifierMask" shift="YES" command="YES"/>
+                                <connections>
+                                    <action selector="newFactorListener:" target="-1" id="7yk-oP-H5Z"/>
+                                </connections>
+                            </menuItem>
+                            <menuItem isSeparatorItem="YES" id="290">
+                                <modifierMask key="keyEquivalentModifierMask" command="YES"/>
+                            </menuItem>
+                            <menuItem title="Show Browser" keyEquivalent="b" id="288">
+                                <connections>
+                                    <action selector="showFactorBrowser:" target="-1" id="g0e-dO-s7I"/>
+                                </connections>
+                            </menuItem>
+                            <menuItem title="New Browser" keyEquivalent="B" id="289">
+                                <modifierMask key="keyEquivalentModifierMask" shift="YES" command="YES"/>
+                                <connections>
+                                    <action selector="newFactorBrowser:" target="-1" id="cLP-Ug-xfc"/>
+                                </connections>
+                            </menuItem>
+                            <menuItem isSeparatorItem="YES" id="PMQ-EN-0tV">
+                                <modifierMask key="keyEquivalentModifierMask" command="YES"/>
+                            </menuItem>
+                            <menuItem title="Switch Theme" id="Wvq-ot-R3p">
+                                <modifierMask key="keyEquivalentModifierMask"/>
+                                <menu key="submenu" title="Switch Theme" id="HqQ-K2-6Sn">
+                                    <items>
+                                        <menuItem title="Light" id="dSP-rb-Ak9">
+                                            <modifierMask key="keyEquivalentModifierMask"/>
+                                            <connections>
+                                                <action selector="switchLightTheme:" target="-1" id="Y29-I0-nL0"/>
+                                            </connections>
+                                        </menuItem>
+                                        <menuItem title="Dark" id="hBk-Ue-CIf">
+                                            <modifierMask key="keyEquivalentModifierMask"/>
+                                            <connections>
+                                                <action selector="switchDarkTheme:" target="-1" id="2ug-u3-tEU"/>
+                                            </connections>
+                                        </menuItem>
+                                    </items>
+                                </menu>
+                            </menuItem>
+                        </items>
+                    </menu>
+                </menuItem>
+                <menuItem title="Window" id="19">
+                    <menu key="submenu" title="Window" systemMenu="window" id="24">
+                        <items>
+                            <menuItem title="Minimize" keyEquivalent="m" id="23">
+                                <connections>
+                                    <action selector="performMiniaturize:" target="-1" id="37"/>
+                                </connections>
+                            </menuItem>
+                            <menuItem title="Zoom" id="239">
+                                <connections>
+                                    <action selector="performZoom:" target="-1" id="240"/>
+                                </connections>
+                            </menuItem>
+                            <menuItem isSeparatorItem="YES" id="92">
+                                <modifierMask key="keyEquivalentModifierMask" command="YES"/>
+                            </menuItem>
+                            <menuItem title="Bring All to Front" id="5">
+                                <connections>
+                                    <action selector="arrangeInFront:" target="-1" id="39"/>
+                                </connections>
+                            </menuItem>
+                        </items>
+                    </menu>
+                </menuItem>
+                <menuItem title="Help" id="103">
+                    <menu key="submenu" title="Help" id="106">
+                        <items>
+                            <menuItem title="Factor Help" keyEquivalent="?" id="111">
+                                <connections>
+                                    <action selector="showFactorBrowser:" target="-1" id="Ddd-ic-q9J"/>
+                                </connections>
+                            </menuItem>
+                        </items>
+                    </menu>
+                </menuItem>
+            </items>
+        </menu>
+    </objects>
+</document>
diff --git a/Factor.app/Contents/Resources/English.lproj/Factor.nib/info.nib b/Factor.app/Contents/Resources/English.lproj/Factor.nib/info.nib
deleted file mode 100644 (file)
index 1d9f641..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-       <key>IBFramework Version</key>
-       <string>677</string>
-       <key>IBOldestOS</key>
-       <integer>5</integer>
-       <key>IBOpenObjects</key>
-       <array/>
-       <key>IBSystem Version</key>
-       <string>9J61</string>
-       <key>targetFramework</key>
-       <string>IBCocoaFramework</string>
-</dict>
-</plist>
index 1659393f2e09f2c10eeb2c37f5afe96dadbe7f1c..67eedf8402b80dd76aead6b5f9a565daebf9cdd4 100644 (file)
Binary files a/Factor.app/Contents/Resources/English.lproj/Factor.nib/keyedobjects.nib and b/Factor.app/Contents/Resources/English.lproj/Factor.nib/keyedobjects.nib differ
index 2396d2e24a3b5607bf01e2f532e993efddcae811..fe5a6984b8ba0f471faf5ba21ebdeec9ac9b3092 100644 (file)
@@ -108,12 +108,13 @@ H{
 SYMBOL: url-style
 H{
     { font-name $ default-monospace-font-name }
 SYMBOL: url-style
 H{
     { font-name $ default-monospace-font-name }
-    { foreground $ url-color }
+    { foreground $ link-color }
 } url-style set-global
 
 SYMBOL: warning-style
 H{
     { page-color $ warning-background-color }
 } url-style set-global
 
 SYMBOL: warning-style
 H{
     { page-color $ warning-background-color }
+    { border-color $ warning-border-color }
     { inset { 5 5 } }
     { wrap-margin $ wrap-margin-full }
 } warning-style set-global
     { inset { 5 5 } }
     { wrap-margin $ wrap-margin-full }
 } warning-style set-global
@@ -121,6 +122,7 @@ H{
 SYMBOL: deprecated-style
 H{
     { page-color $ warning-background-color }
 SYMBOL: deprecated-style
 H{
     { page-color $ warning-background-color }
+    { border-color $ warning-border-color }
     { inset { 5 5 } }
     { wrap-margin $ wrap-margin-full }
 } deprecated-style set-global
     { inset { 5 5 } }
     { wrap-margin $ wrap-margin-full }
 } deprecated-style set-global
index b682ed1da09bcacffe117064aaa2170bbd7bd0db..9529103ddde35b27311148270b6e9ac49703a18c 100644 (file)
@@ -1,6 +1,6 @@
 USING: debugger editors help help.apropos help.markup
 help.syntax help.vocabs memory see stack-checker
 USING: debugger editors help help.apropos help.markup
 help.syntax help.vocabs memory see stack-checker
-tools.destructors tools.time ui.theme.switching ;
+tools.destructors tools.time ;
 IN: help.tips
 
 TIP: "To look at the most recent error, run " { $link :error } ". To look at the most recent error's callstack, run " { $link :c } "." ;
 IN: help.tips
 
 TIP: "To look at the most recent error, run " { $link :error } ". To look at the most recent error's callstack, run " { $link :c } "." ;
@@ -27,8 +27,6 @@ TIP: "To save time on reloading big libraries such as the " { $vocab-link "furna
 
 TIP: "Use the " { $link leaks. } " combinator to track down resource leaks." ;
 
 
 TIP: "Use the " { $link leaks. } " combinator to track down resource leaks." ;
 
-TIP: "Use " { $link light-mode } " and " { $link dark-mode } " for a light or dark user interface." ;
-
 HELP: TIP:
 { $syntax "TIP: content ;" }
 { $values { "content" "a markup element" } }
 HELP: TIP:
 { $syntax "TIP: content ;" }
 { $values { "content" "a markup element" } }
index d256e747e7126c8e6c8b97bb8158cac26181c899..5099c5ab905299966e028a2132c7c4a2a3edf44e 100644 (file)
@@ -4,7 +4,7 @@ USING: accessors colors colors.constants
 combinators.short-circuit compiler.units continuations debugger
 fry io io.styles kernel lexer literals locals math math.parser
 namespaces parser parser.notes prettyprint sequences sets
 combinators.short-circuit compiler.units continuations debugger
 fry io io.styles kernel lexer literals locals math math.parser
 namespaces parser parser.notes prettyprint sequences sets
-source-files.errors system ui.theme vocabs vocabs.loader
+source-files.errors system vocabs vocabs.loader
 vocabs.parser ;
 IN: listener
 
 vocabs.parser ;
 IN: listener
 
@@ -17,8 +17,8 @@ GENERIC# prompt. 1 ( stream prompt -- )
 
 SYMBOL: prompt-style
 H{
 
 SYMBOL: prompt-style
 H{
-    { background $ prompt-background-color }
-    { foreground $ text-color }
+    { background T{ rgba f 1 0.7 0.7 1 } }
+    { foreground COLOR: black }
 } prompt-style set-global
 
 M: object prompt.
 } prompt-style set-global
 
 M: object prompt.
index 51544e5b3c4a74a32f6f8552d20bb35ce362fbc1..ccdedde73d773546f9d46254c7acd5c515725b59 100644 (file)
@@ -1,15 +1,15 @@
 ! Copyright (C) 2009 Keith Lazuka, Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 ! Copyright (C) 2009 Keith Lazuka, Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: assocs colors combinators
+USING: assocs colors colors.constants combinators
 combinators.short-circuit hashtables io.styles kernel literals
 combinators.short-circuit hashtables io.styles kernel literals
-namespaces sequences ui.theme words words.symbol ;
+namespaces sequences words words.symbol ;
 IN: prettyprint.stylesheet
 
 <PRIVATE
 
 { POSTPONE: USING: POSTPONE: USE: POSTPONE: IN: }
 [
 IN: prettyprint.stylesheet
 
 <PRIVATE
 
 { POSTPONE: USING: POSTPONE: USE: POSTPONE: IN: }
 [
-    { { foreground $ dim-color } }
+    { { foreground COLOR: gray35 } }
     "word-style" set-word-prop
 ] each
 
     "word-style" set-word-prop
 ] each
 
@@ -17,39 +17,44 @@ PREDICATE: highlighted-word < word [ parsing-word? ] [ delimiter? ] bi or ;
 
 PRIVATE>
 
 
 PRIVATE>
 
+SYMBOL: base-word-style
+H{ } base-word-style set-global
+
 GENERIC: word-style ( word -- style )
 
 M: word word-style
 GENERIC: word-style ( word -- style )
 
 M: word word-style
-    [ presented associate ]
-    [ "word-style" word-prop ] bi assoc-union!
-    text-color foreground pick set-at ;
-
-M: highlighted-word word-style
-    call-next-method
-    highlighted-word-color foreground pick set-at ;
+    [ presented base-word-style get clone [ set-at ] keep ]
+    [ "word-style" word-prop ] bi assoc-union! ;
 
 
-<PRIVATE
+SYMBOL: highlighted-word-style
+H{
+    { foreground COLOR: DarkSlateGray }
+} highlighted-word-style set-global
 
 
-: colored-presentation-style ( obj color -- style )
-    2 <hashtable> [
-        [ presented foreground ] dip
-        [ set-at ] curry bi-curry@ bi*
-    ] keep ;
+M: highlighted-word word-style
+    call-next-method highlighted-word-style get assoc-union! ;
 
 
-PRIVATE>
+SYMBOL: base-string-style
+H{
+    { foreground COLOR: LightSalmon4 }
+} base-string-style set-global
 
 : string-style ( str -- style )
 
 : string-style ( str -- style )
-    string-color colored-presentation-style ;
+    presented base-string-style get clone [ set-at ] keep ;
+
+SYMBOL: base-vocab-style
+H{
+    { foreground COLOR: gray35 }
+} base-vocab-style set-global
 
 : vocab-style ( vocab -- style )
 
 : vocab-style ( vocab -- style )
-    dim-color colored-presentation-style ;
+    presented base-vocab-style get clone [ set-at ] keep ;
 
 SYMBOL: stack-effect-style
 
 SYMBOL: stack-effect-style
-
 H{
 H{
-    { foreground $ stack-effect-color }
+    { foreground COLOR: FactorDarkGreen }
     { font-style plain }
 } stack-effect-style set-global
 
 : effect-style ( effect -- style )
     { font-style plain }
 } stack-effect-style set-global
 
 : effect-style ( effect -- style )
-    presented associate stack-effect-style get assoc-union! ;
+    presented stack-effect-style get clone [ set-at ] keep ;
index 94d522c933b1ef948efe5202aa43dc7b7a79f268..a514d8c10223d06078eb6006a04381b93fd4f888 100644 (file)
@@ -1,11 +1,11 @@
 ! Copyright (C) 2006, 2010 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 ! Copyright (C) 2006, 2010 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: alien.syntax cocoa cocoa.nibs cocoa.application
-cocoa.classes cocoa.dialogs cocoa.pasteboard cocoa.runtime
-cocoa.subclassing core-foundation core-foundation.strings
-help.topics kernel memory namespaces parser system ui
-ui.tools.browser ui.tools.listener ui.backend.cocoa eval
-locals listener vocabs.refresh ;
+USING: alien.syntax cocoa cocoa.application cocoa.classes
+cocoa.dialogs cocoa.nibs cocoa.pasteboard cocoa.runtime
+cocoa.subclassing core-foundation.strings eval kernel listener
+locals memory namespaces system ui.backend.cocoa
+ui.theme.switching ui.tools.browser ui.tools.listener
+vocabs.refresh ;
 FROM: alien.c-types => int void ;
 IN: ui.backend.cocoa.tools
 
 FROM: alien.c-types => int void ;
 IN: ui.backend.cocoa.tools
 
@@ -27,9 +27,9 @@ CLASS: FactorWorkspaceApplicationDelegate < FactorApplicationDelegate
 
     METHOD: int applicationShouldHandleReopen: id app hasVisibleWindows: int flag [ flag 0 = [ show-listener ] when 1 ] ;
 
 
     METHOD: int applicationShouldHandleReopen: id app hasVisibleWindows: int flag [ flag 0 = [ show-listener ] when 1 ] ;
 
-    METHOD: id factorListener: id app [ show-listener f ] ;
+    METHOD: id showFactorListener: id app [ show-listener f ] ;
 
 
-    METHOD: id factorBrowser: id app [ show-browser f ] ;
+    METHOD: id showFactorBrowser: id app [ show-browser f ] ;
 
     METHOD: id newFactorListener: id app [ listener-window f ] ;
 
 
     METHOD: id newFactorListener: id app [ listener-window f ] ;
 
@@ -41,6 +41,10 @@ CLASS: FactorWorkspaceApplicationDelegate < FactorApplicationDelegate
 
     METHOD: id saveFactorImageAs: id app [ menu-save-image f ] ;
 
 
     METHOD: id saveFactorImageAs: id app [ menu-save-image f ] ;
 
+    METHOD: id switchLightTheme: id app [ light-mode f ] ;
+
+    METHOD: id switchDarkTheme: id app [ dark-mode f ] ;
+
     METHOD: id refreshAll: id app [ [ refresh-all ] \ refresh-all call-listener f ] ;
 ;
 
     METHOD: id refreshAll: id app [ [ refresh-all ] \ refresh-all call-listener f ] ;
 ;
 
index 998bfb538acfbbe8653671eadc98c307c93ff0ba..a4fce2cd57ba57899131af0bbe6ddb10c7cd4f0e 100644 (file)
@@ -2,8 +2,8 @@
 ! See http://factorcode.org/license.txt for BSD license.
 USING: accessors arrays colors.constants combinators fonts fry
 kernel make math.functions models namespaces sequences splitting
 ! See http://factorcode.org/license.txt for BSD license.
 USING: accessors arrays colors.constants combinators fonts fry
 kernel make math.functions models namespaces sequences splitting
-strings ui.baseline-alignment ui.gadgets ui.gadgets.tracks
-ui.pens.solid ui.render ui.text ui.tools.common ;
+strings ui.baseline-alignment ui.gadgets ui.gadgets.theme
+ui.gadgets.tracks ui.pens.solid ui.render ui.text ;
 IN: ui.gadgets.labels
 
 ! A label gadget draws a string.
 IN: ui.gadgets.labels
 
 ! A label gadget draws a string.
index 4b2eb0f6993482488317dc792a6e7e00b5390589..078c0eb1494e1c45a768ce311540422253125429 100644 (file)
@@ -3,7 +3,7 @@
 USING: accessors arrays combinators fry kernel math
 math.functions math.order math.ranges math.vectors namespaces
 opengl sequences ui.gadgets ui.gadgets.scrollers
 USING: accessors arrays combinators fry kernel math
 math.functions math.order math.ranges math.vectors namespaces
 opengl sequences ui.gadgets ui.gadgets.scrollers
-ui.gadgets.viewports ui.render ui.text ;
+ui.gadgets.viewports ui.render ui.text ui.theme ;
 IN: ui.gadgets.line-support
 
 ! Some code shared by table and editor gadgets
 IN: ui.gadgets.line-support
 
 ! Some code shared by table and editor gadgets
index f660b1dbf121dcdb326916cc42bbc3fbd34adb07..dba9a9adae6b44e044111c9e46ca2751d15fb705 100644 (file)
@@ -3,8 +3,8 @@
 USING: accessors kernel locals math.rectangles math.vectors
 namespaces opengl sequences sorting ui.commands ui.gadgets
 ui.gadgets.buttons ui.gadgets.glass ui.gadgets.packs
 USING: accessors kernel locals math.rectangles math.vectors
 namespaces opengl sequences sorting ui.commands ui.gadgets
 ui.gadgets.buttons ui.gadgets.glass ui.gadgets.packs
-ui.gadgets.theme ui.gadgets.worlds ui.gestures ui.operations
-ui.pens ui.pens.solid ui.tools.common ;
+ui.gadgets.worlds ui.gestures ui.operations
+ui.pens ui.pens.solid ui.theme ui.tools.common ;
 IN: ui.gadgets.menus
 
 : show-menu ( owner menu -- )
 IN: ui.gadgets.menus
 
 : show-menu ( owner menu -- )
index e76417ee71470315aba8497b04418fc8b5669b84..5a706b0c6f663838c0f4cd5a720b402acd0fbb25 100644 (file)
@@ -9,7 +9,7 @@ ui.gadgets.icons ui.gadgets.incremental ui.gadgets.labels
 ui.gadgets.menus ui.gadgets.packs ui.gadgets.paragraphs
 ui.gadgets.presentations ui.gadgets.private ui.gadgets.scrollers
 ui.gadgets.tracks ui.gestures ui.images ui.pens.solid ui.render
 ui.gadgets.menus ui.gadgets.packs ui.gadgets.paragraphs
 ui.gadgets.presentations ui.gadgets.private ui.gadgets.scrollers
 ui.gadgets.tracks ui.gestures ui.images ui.pens.solid ui.render
-ui.traverse ;
+ui.theme ui.traverse ;
 FROM: io.styles => foreground background ;
 FROM: ui.gadgets.wrappers => <wrapper> ;
 IN: ui.gadgets.panes
 FROM: io.styles => foreground background ;
 FROM: ui.gadgets.wrappers => <wrapper> ;
 IN: ui.gadgets.panes
index d542494096068b4c6af6a7a03ea546256c5f77b7..b65ca9d074410310e0eadb718a7a2b76b99ed81c 100644 (file)
@@ -3,8 +3,7 @@
 USING: accessors kernel memoize namespaces ui.commands ui.gadgets
 ui.gadgets.borders ui.gadgets.buttons ui.gadgets.buttons.private
 ui.gadgets.glass ui.gadgets.menus ui.gadgets.status-bar
 USING: accessors kernel memoize namespaces ui.commands ui.gadgets
 ui.gadgets.borders ui.gadgets.buttons ui.gadgets.buttons.private
 ui.gadgets.glass ui.gadgets.menus ui.gadgets.status-bar
-ui.gadgets.theme ui.gadgets.worlds ui.gestures
-ui.operations ui.pens.solid ;
+ui.gadgets.worlds ui.gestures ui.operations ui.pens.solid ui.theme ;
 IN: ui.gadgets.presentations
 
 TUPLE: presentation < button object hook ;
 IN: ui.gadgets.presentations
 
 TUPLE: presentation < button object hook ;
index 3e3e603fedb261bf7ee09361daca56a975558f1c..73b763c59f234b6f3d685c90dd1c5081f9d5d532 100644 (file)
@@ -3,7 +3,7 @@
 USING: accessors calendar colors.constants fonts kernel models
 models.arrow models.delay sequences summary ui
 ui.gadgets.borders ui.gadgets.labels ui.gadgets.tracks
 USING: accessors calendar colors.constants fonts kernel models
 models.arrow models.delay sequences summary ui
 ui.gadgets.borders ui.gadgets.labels ui.gadgets.tracks
-ui.gadgets.theme ui.gadgets.worlds ui.pens.solid ui.private ;
+ui.gadgets.worlds ui.pens.solid ui.private ui.theme ;
 IN: ui.gadgets.status-bar
 
 : status-bar-font ( -- font )
 IN: ui.gadgets.status-bar
 
 : status-bar-font ( -- font )
index 5bd9209c880252074a3025bdc0b52ca58f661f5e..58252100ef9d36c5631daf5ce67a63c456b3669b 100644 (file)
@@ -5,8 +5,8 @@ combinators.short-circuit fonts fry kernel locals math
 math.functions math.order math.rectangles math.vectors models
 namespaces opengl sequences splitting strings ui.commands
 ui.gadgets ui.gadgets.line-support ui.gadgets.menus
 math.functions math.order math.rectangles math.vectors models
 namespaces opengl sequences splitting strings ui.commands
 ui.gadgets ui.gadgets.line-support ui.gadgets.menus
-ui.gadgets.scrollers ui.gadgets.status-bar ui.gadgets.theme ui.gadgets.worlds
-ui.gestures ui.images ui.pens.solid ui.render ui.text ;
+ui.gadgets.scrollers ui.gadgets.status-bar ui.gadgets.worlds
+ui.gestures ui.images ui.pens.solid ui.render ui.text ui.theme ;
 IN: ui.gadgets.tables
 
 ! Row rendererer protocol
 IN: ui.gadgets.tables
 
 ! Row rendererer protocol
index 1a764b9828358e3ec10e69c0f6bd2c1449e9ad0f..bea1fad24b79670333f1b7e63237c1b217926c14 100644 (file)
@@ -1,7 +1,10 @@
 ! Copyright (C) 2009, 2010 Slava Pestov, Joe Groff.
 ! See http://factorcode.org/license.txt for BSD license.
 ! Copyright (C) 2009, 2010 Slava Pestov, Joe Groff.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: io.pathnames sequences ui.images ;
+USING: accessors io.pathnames sequences ui.images ui.theme ;
 IN: ui.gadgets.theme
 
 : theme-image ( name -- image-name )
     "vocab:ui/gadgets/theme/" prepend-path ".tiff" append <image-name> ;
 IN: ui.gadgets.theme
 
 : theme-image ( name -- image-name )
     "vocab:ui/gadgets/theme/" prepend-path ".tiff" append <image-name> ;
+
+: theme-font-colors ( gadget -- gadget )
+    [ content-background >>background text-color >>foreground ] change-font ;
index 0afdad0bc938c07103eed691e5cbab5540a31b97..786ee6e6986c5253c867eb286dbd75bb4e12795e 100644 (file)
@@ -1,31 +1,57 @@
 ! Copyright (C) 2016 Nicolas Pénet.
 ! See http://factorcode.org/license.txt for BSD license.
 ! Copyright (C) 2016 Nicolas Pénet.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: fry hashtables help.stylesheet help.tips io.styles
-kernel listener namespaces ui.theme ui.tools.listener ;
+USING: assocs fry hashtables help.stylesheet help.tips io.styles
+kernel listener namespaces prettyprint.stylesheet sequences
+ui.theme ui.tools.listener vocabs.prettyprint words ;
 IN: ui.theme.switching
 
 : (update-style) ( style color elt -- )
     '[ _ _ rot ?set-at ] change-global ;
 
 : update-stylesheet ( -- )
 IN: ui.theme.switching
 
 : (update-style) ( style color elt -- )
     '[ _ _ rot ?set-at ] change-global ;
 
 : update-stylesheet ( -- )
+
+    ! help.stylesheet
     default-span-style text-color foreground (update-style)
     link-style link-color foreground (update-style)
     title-style title-color foreground (update-style)
     default-span-style text-color foreground (update-style)
     link-style link-color foreground (update-style)
     title-style title-color foreground (update-style)
+    help-path-style help-path-border-color table-border (update-style)
     heading-style heading-color foreground (update-style)
     snippet-style snippet-color foreground (update-style)
     code-style code-background-color page-color (update-style)
     output-style output-color foreground (update-style)
     heading-style heading-color foreground (update-style)
     snippet-style snippet-color foreground (update-style)
     code-style code-background-color page-color (update-style)
     output-style output-color foreground (update-style)
-    url-style url-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)
-    deprecated-style warning-background-color page-color (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)
+    warning-style warning-border-color border-color (update-style)
+    deprecated-style deprecated-background-color page-color (update-style)
+    deprecated-style deprecated-border-color border-color (update-style)
+    table-style table-border-color table-border (update-style)
+
+    ! 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
     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
+    { POSTPONE: USING: POSTPONE: USE: POSTPONE: IN: }
+    [ "word-style" word-prop [ dim-color foreground  ] dip set-at ] each
+    base-word-style text-color foreground (update-style)
+    highlighted-word-style highlighted-word-color foreground (update-style)
+    base-string-style string-color foreground (update-style)
+    base-vocab-style dim-color foreground (update-style)
+    stack-effect-style stack-effect-color foreground (update-style)
+
+    ! listener
+    prompt-style prompt-background-color background (update-style)
+    prompt-style text-color foreground (update-style)
+
+    ! vocabs.prettyprint
+    manifest-style vocab-background-color page-color (update-style)
+    manifest-style vocab-border-color border-color (update-style) ;
 
 
-: light-mode ( -- ) light-theme theme set-global update-stylesheet ;
-: dark-mode ( -- ) dark-theme theme set-global update-stylesheet ;
+: light-mode ( -- )
+    light-theme theme set-global update-stylesheet ;
 
 
-light-mode
+: dark-mode ( -- )
+    dark-theme theme set-global update-stylesheet ;
index dbdd5ec37e079f2e8b4fbfc5226b18bfae30b533..de20ca1b7d40733a21aa6aa85652b4148b26181c 100644 (file)
@@ -63,8 +63,12 @@ HOOK: title-color theme ( -- color )
 HOOK: heading-color theme ( -- color )
 HOOK: snippet-color theme ( -- color )
 HOOK: output-color theme ( -- color )
 HOOK: heading-color theme ( -- color )
 HOOK: snippet-color theme ( -- color )
 HOOK: output-color theme ( -- color )
+HOOK: deprecated-background-color theme ( -- color )
+HOOK: deprecated-border-color theme ( -- color )
 HOOK: warning-background-color theme ( -- color )
 HOOK: warning-background-color theme ( -- color )
+HOOK: warning-border-color theme ( -- color )
 HOOK: code-background-color theme ( -- color )
 HOOK: code-background-color theme ( -- color )
+HOOK: help-path-border-color theme ( -- color )
 
 HOOK: tip-background-color theme ( -- color )
 
 
 HOOK: tip-background-color theme ( -- color )
 
@@ -86,7 +90,10 @@ HOOK: focus-border-color theme ( -- color )
 
 HOOK: labeled-border-color theme ( -- color )
 
 
 HOOK: labeled-border-color theme ( -- color )
 
+HOOK: table-border-color theme ( -- color )
+
 SINGLETON: light-theme
 SINGLETON: light-theme
+theme [ light-theme ] initialize
 
 M: light-theme toolbar-background COLOR: grey95 ;
 M: light-theme toolbar-button-pressed-background COLOR: dark-gray ;
 
 M: light-theme toolbar-background COLOR: grey95 ;
 M: light-theme toolbar-button-pressed-background COLOR: dark-gray ;
@@ -141,22 +148,25 @@ M: light-theme content-background COLOR: white ;
 M: light-theme text-color COLOR: black ;
 
 M: light-theme link-color COLOR: DodgerBlue4 ;
 M: light-theme text-color COLOR: black ;
 
 M: light-theme link-color COLOR: DodgerBlue4 ;
-M: light-theme url-color COLOR: DodgerBlue4 ;
 M: light-theme title-color COLOR: gray20 ;
 M: light-theme heading-color COLOR: FactorDarkSlateBlue ;
 M: light-theme title-color COLOR: gray20 ;
 M: light-theme heading-color COLOR: FactorDarkSlateBlue ;
-M: light-theme snippet-color COLOR: solarized-orange ;
-M: light-theme output-color COLOR: solarized-orange ;
-M: light-theme warning-background-color T{ rgba f 1 0.7 0.7 1 } ;
+M: light-theme snippet-color COLOR: DarkOrange4 ;
+M: light-theme output-color COLOR: DarkOrange4 ;
+M: light-theme deprecated-background-color COLOR: gray90 ;
+M: light-theme deprecated-border-color COLOR: red ;
+M: light-theme warning-background-color COLOR: gray90 ;
+M: light-theme warning-border-color COLOR: red ;
 M: light-theme code-background-color COLOR: FactorLightTan ;
 M: light-theme code-background-color COLOR: FactorLightTan ;
+M: light-theme help-path-border-color COLOR: FactorLightTan ;
 
 M: light-theme tip-background-color COLOR: lavender ;
 
 M: light-theme prompt-background-color T{ rgba f 1 0.7 0.7 1 } ;
 
 
 M: light-theme tip-background-color COLOR: lavender ;
 
 M: light-theme prompt-background-color T{ rgba f 1 0.7 0.7 1 } ;
 
-M: light-theme dim-color COLOR: solarized-cyan ;
-M: light-theme highlighted-word-color COLOR: solarized-green ;
-M: light-theme string-color COLOR: solarized-magenta ;
-M: light-theme stack-effect-color COLOR: solarized-orange ;
+M: light-theme dim-color COLOR: gray35 ;
+M: light-theme highlighted-word-color COLOR: DarkSlateGray ;
+M: light-theme string-color COLOR: LightSalmon4 ;
+M: light-theme stack-effect-color COLOR: FactorDarkGreen ;
 
 M: light-theme vocab-background-color COLOR: FactorLightTan ;
 M: light-theme vocab-border-color COLOR: FactorDarkTan ;
 
 M: light-theme vocab-background-color COLOR: FactorLightTan ;
 M: light-theme vocab-border-color COLOR: FactorDarkTan ;
@@ -169,6 +179,8 @@ M: light-theme focus-border-color COLOR: dark-gray ;
 
 M: light-theme labeled-border-color COLOR: grey85 ;
 
 
 M: light-theme labeled-border-color COLOR: grey85 ;
 
+M: light-theme table-border-color COLOR: FactorTan ;
+
 SINGLETON: dark-theme
 
 M: dark-theme toolbar-background COLOR: solarized-base02 ;
 SINGLETON: dark-theme
 
 M: dark-theme toolbar-background COLOR: solarized-base02 ;
@@ -224,13 +236,16 @@ M: dark-theme content-background COLOR: solarized-base03 ;
 M: dark-theme text-color COLOR: grey75 ;
 
 M: dark-theme link-color COLOR: solarized-blue ;
 M: dark-theme text-color COLOR: grey75 ;
 
 M: dark-theme link-color COLOR: solarized-blue ;
-M: dark-theme url-color COLOR: solarized-blue ;
 M: dark-theme title-color COLOR: grey75 ;
 M: dark-theme heading-color COLOR: grey75 ;
 M: dark-theme snippet-color COLOR: solarized-orange ;
 M: dark-theme output-color COLOR: solarized-orange ;
 M: dark-theme title-color COLOR: grey75 ;
 M: dark-theme heading-color COLOR: grey75 ;
 M: dark-theme snippet-color COLOR: solarized-orange ;
 M: dark-theme output-color COLOR: solarized-orange ;
+M: dark-theme deprecated-background-color HEXCOLOR: 6E2E32 ;
+M: dark-theme deprecated-border-color COLOR: red ;
 M: dark-theme warning-background-color HEXCOLOR: 6E2E32 ;
 M: dark-theme warning-background-color HEXCOLOR: 6E2E32 ;
+M: dark-theme warning-border-color COLOR: red ;
 M: dark-theme code-background-color HEXCOLOR: 2F4D5B ;
 M: dark-theme code-background-color HEXCOLOR: 2F4D5B ;
+M: dark-theme help-path-border-color HEXCOLOR: 2F4D5B ;
 
 M: dark-theme tip-background-color HEXCOLOR: 2F4D5B ;
 
 
 M: dark-theme tip-background-color HEXCOLOR: 2F4D5B ;
 
@@ -252,4 +267,4 @@ M: dark-theme focus-border-color COLOR: solarized-base01 ;
 
 M: dark-theme labeled-border-color COLOR: solarized-base01 ;
 
 
 M: dark-theme labeled-border-color COLOR: solarized-base01 ;
 
-light-theme theme set-global
+M: dark-theme table-border-color COLOR: solarized-base01 ;
index e4ad3dae48e0f5e3fe61e0047cb19ae078c097ee..c106a22b95a24fad8f469d94e7e15f6573e19e3f 100644 (file)
@@ -8,10 +8,10 @@ make models namespaces sequences sets ui ui.commands ui.gadgets
 ui.gadgets.borders ui.gadgets.editors ui.gadgets.editors.private
 ui.gadgets.glass ui.gadgets.labels ui.gadgets.labels.private
 ui.gadgets.panes ui.gadgets.scrollers ui.gadgets.status-bar
 ui.gadgets.borders ui.gadgets.editors ui.gadgets.editors.private
 ui.gadgets.glass ui.gadgets.labels ui.gadgets.labels.private
 ui.gadgets.panes ui.gadgets.scrollers ui.gadgets.status-bar
-ui.theme ui.gadgets.toolbar ui.gadgets.tracks
+ui.theme ui.gadgets.theme ui.gadgets.toolbar ui.gadgets.tracks
 ui.gadgets.viewports ui.gadgets.worlds ui.gestures ui.pens.solid
 ui.gadgets.viewports ui.gadgets.worlds ui.gestures ui.pens.solid
-ui.render ui.text ui.tools.browser.history
-ui.tools.browser.popups ui.tools.common vocabs ;
+ui.render ui.text ui.tools.common ui.tools.browser.history
+ui.tools.browser.popups vocabs ;
 IN: ui.tools.browser
 
 TUPLE: browser-gadget < tool history scroller search-field popup ;
 IN: ui.tools.browser
 
 TUPLE: browser-gadget < tool history scroller search-field popup ;
index d4f01fd7950d5151bbcdb9abc555d62464040da8..d2bb6ef48cec612fd0f4b76b7e1061b73ec0f979 100644 (file)
@@ -5,7 +5,7 @@ definitions.icons fry help help.topics kernel math.rectangles
 models.arrow namespaces sequences tools.crossref ui.gadgets
 ui.gadgets.glass ui.gadgets.labeled ui.gadgets.search-tables
 ui.gadgets.tables ui.gadgets.theme ui.gadgets.wrappers ui.gestures ui.images
 models.arrow namespaces sequences tools.crossref ui.gadgets
 ui.gadgets.glass ui.gadgets.labeled ui.gadgets.search-tables
 ui.gadgets.tables ui.gadgets.theme ui.gadgets.wrappers ui.gestures ui.images
-ui.operations ui.pens.solid ;
+ui.operations ui.pens.solid ui.theme ;
 FROM: ui.gadgets.wrappers => wrapper ;
 IN: ui.tools.browser.popups
 
 FROM: ui.gadgets.wrappers => wrapper ;
 IN: ui.tools.browser.popups
 
index 287539c540245dcfc2b55fb1c6a470e8a778d339..9c927a0a158838c90190383e3a2bab395edd0853 100644 (file)
@@ -49,6 +49,3 @@ SLOT: scroller
 
 : white-interior ( track -- track )
     content-background <solid> >>interior ;
 
 : white-interior ( track -- track )
     content-background <solid> >>interior ;
-
-: theme-font-colors ( gadget -- gadget )
-    [ content-background >>background text-color >>foreground ] change-font ;
index 610aa10b6f8f548626f5bacd1ad7f604002a01d6..f1ec3fb2d7ba01c8a504008710ee1e53b29aaa35 100644 (file)
@@ -7,7 +7,7 @@ ui.debugger ui.gestures ui.gadgets ui.pens.solid
 ui.gadgets.worlds ui.gadgets.packs ui.gadgets.buttons
 ui.gadgets.labels ui.gadgets.presentations ui.gadgets.panes
 ui.gadgets.viewports ui.gadgets.tables ui.theme
 ui.gadgets.worlds ui.gadgets.packs ui.gadgets.buttons
 ui.gadgets.labels ui.gadgets.presentations ui.gadgets.panes
 ui.gadgets.viewports ui.gadgets.tables ui.theme
-ui.gadgets.tracks ui.gadgets.toolbar
+ui.gadgets.theme ui.gadgets.tracks ui.gadgets.toolbar
 ui.gadgets.scrollers ui.gadgets.borders ui.gadgets.status-bar
 ui.tools.traceback ui.tools.inspector ui.tools.browser ui.tools.common ;
 IN: ui.tools.debugger
 ui.gadgets.scrollers ui.gadgets.borders ui.gadgets.status-bar
 ui.tools.traceback ui.tools.inspector ui.tools.browser ui.tools.common ;
 IN: ui.tools.debugger
index 29b5dbce14683989652403f3c3bd776ad5692c4c..209e0624bfe3ada19e29de36942ebdd50a6918a0 100644 (file)
@@ -1,13 +1,14 @@
 ! Copyright (C) 2006, 2009 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: accessors colors inspector namespaces kernel models fry
 ! Copyright (C) 2006, 2009 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: accessors colors inspector namespaces kernel models fry
-colors.constants models.arrow prettyprint sequences mirrors assocs
-classes io io.styles arrays hashtables math.order sorting refs fonts
-ui.tools.browser ui.commands ui.operations ui.gadgets ui.gadgets.panes
-ui.gadgets.scrollers ui.gadgets.slots ui.gadgets.tracks ui.gestures
-ui.gadgets.buttons ui.gadgets.tables ui.theme
-ui.gadgets.toolbar ui.gadgets.status-bar
-ui.gadgets.labeled ui.tools.common ui combinators ui.gadgets.worlds ;
+colors.constants models.arrow prettyprint sequences mirrors
+assocs classes io io.styles arrays hashtables math.order sorting
+refs fonts ui.tools.browser ui.commands ui.operations ui.gadgets
+ui.gadgets.panes ui.gadgets.scrollers ui.gadgets.slots
+ui.gadgets.theme ui.gadgets.tracks ui.gestures
+ui.gadgets.buttons ui.gadgets.tables ui.theme ui.gadgets.toolbar
+ui.gadgets.status-bar ui.gadgets.labeled ui.tools.common ui
+combinators ui.gadgets.worlds ;
 IN: ui.tools.inspector
 
 TUPLE: inspector-gadget < tool table ;
 IN: ui.tools.inspector
 
 TUPLE: inspector-gadget < tool table ;
index 47437c631257d0f1b2ec5dd83f608ca892a75445..d5f4b321430a4a33bc35dd94045f55d698e89902 100644 (file)
@@ -9,7 +9,7 @@ ui.gadgets ui.gadgets.editors ui.gadgets.glass
 ui.gadgets.labeled ui.gadgets.scrollers ui.gadgets.tables
 ui.gadgets.theme ui.gadgets.tracks ui.gadgets.worlds
 ui.gadgets.wrappers ui.gestures ui.images ui.operations
 ui.gadgets.labeled ui.gadgets.scrollers ui.gadgets.tables
 ui.gadgets.theme ui.gadgets.tracks ui.gadgets.worlds
 ui.gadgets.wrappers ui.gestures ui.images ui.operations
-ui.pens.solid ui.tools.common ui.tools.listener.history
+ui.pens.solid ui.theme ui.tools.common ui.tools.listener.history
 ui.tools.listener.popups vocabs words ;
 IN: ui.tools.listener.completion
 
 ui.tools.listener.popups vocabs words ;
 IN: ui.tools.listener.completion
 
index 863e170384b08e0507cdeb949ad67dfb53ad2f42..36322b4fc6c53edd6027a614a10f8bfd314c91be 100644 (file)
@@ -10,6 +10,7 @@ prettyprint sequences source-files.errors strings system threads
 tools.errors.model ui ui.commands ui.gadgets ui.gadgets.editors
 ui.gadgets.glass ui.gadgets.labeled ui.gadgets.panes
 ui.gadgets.scrollers ui.gadgets.status-bar ui.theme
 tools.errors.model ui ui.commands ui.gadgets ui.gadgets.editors
 ui.gadgets.glass ui.gadgets.labeled ui.gadgets.panes
 ui.gadgets.scrollers ui.gadgets.status-bar ui.theme
+ui.gadgets.theme
 ui.gadgets.toolbar ui.gadgets.tracks ui.gestures ui.operations
 ui.pens.solid ui.tools.browser ui.tools.common ui.tools.debugger
 ui.tools.error-list ui.tools.listener.completion
 ui.gadgets.toolbar ui.gadgets.tracks ui.gestures ui.operations
 ui.pens.solid ui.tools.browser ui.tools.common ui.tools.debugger
 ui.tools.error-list ui.tools.listener.completion
index 9341d96ab4d460f5ae0e18a80a4a9c9cf6afe787..d2a839ba737cdb24ca85d78152e9a543ff2ff7c4 100644 (file)
@@ -5,7 +5,7 @@ kernel models models.arrow prettyprint sequences ui.commands
 ui.gadgets ui.gadgets.borders ui.gadgets.buttons
 ui.gadgets.labeled ui.gadgets.panes ui.gadgets.scrollers
 ui.gadgets.status-bar ui.gadgets.tables ui.gadgets.toolbar
 ui.gadgets ui.gadgets.borders ui.gadgets.buttons
 ui.gadgets.labeled ui.gadgets.panes ui.gadgets.scrollers
 ui.gadgets.status-bar ui.gadgets.tables ui.gadgets.toolbar
-ui.theme ui.gadgets.tracks
+ui.theme ui.gadgets.theme ui.gadgets.tracks
 ui.gestures ui.tools.common ;
 QUALIFIED-WITH: ui.tools.inspector i
 IN: ui.tools.traceback
 ui.gestures ui.tools.common ;
 QUALIFIED-WITH: ui.tools.inspector i
 IN: ui.tools.traceback
index a8c2f806316a80dfa8cb1408da99aba731e3242c..6d9ffd1a2a63caf1cc6a1b3b90b59cf843795152 100644 (file)
@@ -1,9 +1,8 @@
 ! Copyright (C) 2009 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 ! Copyright (C) 2009 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: accessors arrays assocs colors fry io
-io.styles kernel literals make math.order namespaces parser
-prettyprint.backend prettyprint.sections prettyprint.stylesheet
-sequences sets sorting ui.theme vocabs vocabs.parser ;
+USING: accessors assocs colors.constants fry io io.styles kernel
+make namespaces parser prettyprint.backend prettyprint.sections
+prettyprint.stylesheet sequences sorting vocabs vocabs.parser ;
 FROM: io.styles => inset ;
 IN: vocabs.prettyprint
 
 FROM: io.styles => inset ;
 IN: vocabs.prettyprint
 
@@ -83,6 +82,12 @@ PRIVATE>
 : pprint-manifest ( manifest -- )
     (pprint-manifest pprint-manifest) ;
 
 : pprint-manifest ( manifest -- )
     (pprint-manifest pprint-manifest) ;
 
+CONSTANT: manifest-style H{
+    { page-color COLOR: FactorLightTan }
+    { border-color COLOR: FactorDarkTan }
+    { inset { 5 5 } }
+}
+
 [
     nl
     { { font-style bold } { font-name "sans-serif" } } [
 [
     nl
     { { font-style bold } { font-name "sans-serif" } } [
@@ -90,10 +95,6 @@ PRIVATE>
         "To avoid doing this in the future, add the following forms" print
         "at the top of the source file:" print nl
     ] with-style
         "To avoid doing this in the future, add the following forms" print
         "at the top of the source file:" print nl
     ] with-style
-    {
-        { page-color $ vocab-background-color }
-        { border-color $ vocab-border-color }
-        { inset { 5 5 } }
-    } [ manifest get pprint-manifest ] with-nesting
+    manifest-style [ manifest get pprint-manifest ] with-nesting
     nl nl
 ] print-use-hook set-global
     nl nl
 ] print-use-hook set-global