! Copyright (C) 2005, 2009 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
USING: assocs colors.constants fonts fry io.styles kernel literals
-math namespaces sequences ;
+math namespaces sequences ui.gadgets.theme ;
IN: help.stylesheet
: wrap-margin-full ( -- n )
SYMBOL: link-style
H{
- { foreground COLOR: DodgerBlue4 }
+ { foreground $ link-color }
{ font-style bold }
} link-style set-global
{ font-size $ font-size-title }
{ font-style bold }
{ wrap-margin $ wrap-margin-full }
- { foreground COLOR: gray20 }
+ { foreground $ title-color }
{ page-color COLOR: FactorLightTan }
{ inset { 5 5 } }
} title-style set-global
H{
{ font-size $ default-font-size }
{ table-gap { 5 5 } }
- { table-border COLOR: FactorLightTan }
} help-path-style set-global
SYMBOL: heading-style
{ font-name $ default-sans-serif-font-name }
{ font-size $ font-size-heading }
{ font-style bold }
- { foreground COLOR: FactorDarkSlateBlue }
+ { foreground $ heading-color }
} heading-style set-global
SYMBOL: subsection-style
H{
{ font-name $ default-monospace-font-name }
{ font-size $ default-font-size }
- { foreground COLOR: DarkOrange4 }
+ { foreground $ snippet-color }
} snippet-style set-global
SYMBOL: code-char-style
SYMBOL: code-style
H{
- { page-color COLOR: FactorLightTan }
+ { page-color $ code-background-color }
{ inset { 5 5 } }
{ wrap-margin f }
} code-style set-global
SYMBOL: output-style
H{
{ font-style bold }
- { foreground COLOR: DarkOrange4 }
+ { foreground $ output-color }
} output-style set-global
SYMBOL: url-style
H{
{ font-name $ default-monospace-font-name }
- { foreground COLOR: DodgerBlue4 }
+ { foreground $ url-color }
} url-style set-global
SYMBOL: warning-style
H{
- { page-color COLOR: gray90 }
- { border-color COLOR: red }
+ { page-color $ warning-background-color }
{ inset { 5 5 } }
{ wrap-margin $ wrap-margin-full }
} warning-style set-global
SYMBOL: deprecated-style
H{
- { page-color COLOR: gray90 }
- { border-color COLOR: red }
+ { page-color $ warning-background-color }
{ inset { 5 5 } }
{ wrap-margin $ wrap-margin-full }
} deprecated-style set-global
SYMBOL: table-style
H{
{ table-gap { 5 5 } }
- { table-border COLOR: FactorTan }
+ { table-border $ line-color }
} table-style set-global
SYMBOL: list-style
! Copyright (C) 2009 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
USING: accessors arrays colors.constants definitions help.markup
-help.stylesheet io io.styles kernel literals namespaces parser random
-sequences ;
+help.stylesheet io io.styles kernel literals namespaces parser
+random sequences ui.gadgets.theme ;
IN: help.tips
SYMBOL: tips
SYMBOL: tip-of-the-day-style
H{
- { page-color COLOR: lavender }
+ { page-color $ tip-background-color }
{ inset { 5 5 } }
{ wrap-margin $ wrap-margin-full }
} tip-of-the-day-style set-global
! See http://factorcode.org/license.txt for BSD license.
USING: accessors colors colors.constants
combinators.short-circuit compiler.units continuations debugger
-fry io io.styles kernel lexer locals math math.parser namespaces
-parser parser.notes prettyprint sequences sets
-source-files.errors system vocabs vocabs.loader vocabs.parser ;
+fry io io.styles kernel lexer literals locals math math.parser
+namespaces parser parser.notes prettyprint sequences sets
+source-files.errors system ui.gadgets.theme vocabs vocabs.loader
+vocabs.parser ;
IN: listener
GENERIC: stream-read-quot ( stream -- quot/f )
M: object prompt.
nip H{
- { background T{ rgba f 1 0.7 0.7 1 } }
- { foreground COLOR: black }
+ { background $ prompt-background-color }
+ { foreground $ text-color }
} format bl flush ;
: parse-lines-interactive ( lines -- quot/f )
! Copyright (C) 2009 Keith Lazuka, Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
-USING: assocs colors colors.constants combinators
+USING: assocs colors combinators
combinators.short-circuit hashtables io.styles kernel literals
-namespaces sequences words words.symbol ;
+namespaces sequences ui.gadgets.theme words words.symbol ;
IN: prettyprint.stylesheet
<PRIVATE
-CONSTANT: dim-color COLOR: gray35
-
{ POSTPONE: USING: POSTPONE: USE: POSTPONE: IN: }
[
{ { foreground $ dim-color } }
M: highlighted-word word-style
call-next-method
- COLOR: DarkSlateGray foreground pick set-at ;
+ highlighted-word-color foreground pick set-at ;
<PRIVATE
PRIVATE>
: string-style ( str -- style )
- COLOR: LightSalmon4 colored-presentation-style ;
+ string-color colored-presentation-style ;
: vocab-style ( vocab -- style )
dim-color colored-presentation-style ;
SYMBOL: stack-effect-style
H{
- { foreground COLOR: FactorDarkGreen }
+ { foreground $ stack-effect-color }
{ font-style plain }
} stack-effect-style set-global
: field-theme ( gadget -- gadget )
{ 2 2 } >>size
{ 1 0 } >>fill
- COLOR: gray <solid> >>boundary ; inline
+ field-border-color <solid> >>boundary ; inline
: <field-border> ( gadget -- border )
border new-border field-theme ;
add-content-area ;
: <framed-labeled> ( gadget title color -- labeled )
- <labeled> COLOR: grey85 <solid> >>boundary ;
+ <labeled> labeled-border-color <solid> >>boundary ;
: <labeled-gadget> ( gadget title -- labeled )
vertical labeled-gadget new-track with-lines
{ 5 5 } <border>
content-background <solid> >>interior
1 track-add
- COLOR: grey85 <solid> >>boundary
+ labeled-border-color <solid> >>boundary
{ 3 3 } <border> ;
[ draw-gadget ] each
] with-scope
] [ drop ] if ;
-
-CONSTANT: selection-color T{ rgba f 0.8 0.8 1.0 1.0 }
-
-CONSTANT: panel-background-color
- T{ rgba f
- 0.7843137254901961
- 0.7686274509803922
- 0.7176470588235294
- 1.0
- }
-
-CONSTANT: focus-border-color COLOR: dark-gray
30 >>max-cols ;
: <links-popup> ( model quot title -- gadget )
- [ <links-table> COLOR: white <solid> >>interior ] dip
+ [ <links-table> content-background <solid> >>interior ] dip
popup-color <labeled> links-popup new-wrapper ;
links-popup H{
dup '[ _ accept-completion ] >>action ;
: <completion-scroller> ( completion-popup -- scroller )
- table>> <scroller> COLOR: white <solid> >>interior ;
+ table>> <scroller> content-background <solid> >>interior ;
: <completion-popup> ( interactor completion-mode -- popup )
[ vertical completion-popup new-track ] 2dip
! Copyright (C) 2009 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
-USING: accessors arrays assocs colors colors.constants fry io
-io.styles kernel make math.order namespaces parser
+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 vocabs vocabs.parser ;
+sequences sets sorting ui.gadgets.theme vocabs vocabs.parser ;
FROM: io.styles => inset ;
IN: vocabs.prettyprint
"at the top of the source file:" print nl
] with-style
{
- { page-color COLOR: FactorLightTan }
- { border-color COLOR: FactorDarkTan }
+ { page-color $ vocab-background-color }
+ { border-color $ vocab-border-color }
{ inset { 5 5 } }
} [ manifest get pprint-manifest ] with-nesting
nl nl