Replaced hard-coded colors with constants
parent
bea90b8d1f
commit
e5698281fb
|
@ -1,7 +1,7 @@
|
||||||
! Copyright (C) 2005, 2009 Slava Pestov.
|
! Copyright (C) 2005, 2009 Slava Pestov.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: assocs colors.constants fonts fry io.styles kernel literals
|
USING: assocs colors.constants fonts fry io.styles kernel literals
|
||||||
math namespaces sequences ;
|
math namespaces sequences ui.gadgets.theme ;
|
||||||
IN: help.stylesheet
|
IN: help.stylesheet
|
||||||
|
|
||||||
: wrap-margin-full ( -- n )
|
: wrap-margin-full ( -- n )
|
||||||
|
@ -36,7 +36,7 @@ H{
|
||||||
|
|
||||||
SYMBOL: link-style
|
SYMBOL: link-style
|
||||||
H{
|
H{
|
||||||
{ foreground COLOR: DodgerBlue4 }
|
{ foreground $ link-color }
|
||||||
{ font-style bold }
|
{ font-style bold }
|
||||||
} link-style set-global
|
} link-style set-global
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@ H{
|
||||||
{ font-size $ font-size-title }
|
{ font-size $ font-size-title }
|
||||||
{ font-style bold }
|
{ font-style bold }
|
||||||
{ wrap-margin $ wrap-margin-full }
|
{ wrap-margin $ wrap-margin-full }
|
||||||
{ foreground COLOR: gray20 }
|
{ foreground $ title-color }
|
||||||
{ page-color COLOR: FactorLightTan }
|
{ page-color COLOR: FactorLightTan }
|
||||||
{ inset { 5 5 } }
|
{ inset { 5 5 } }
|
||||||
} title-style set-global
|
} title-style set-global
|
||||||
|
@ -61,7 +61,6 @@ SYMBOL: help-path-style
|
||||||
H{
|
H{
|
||||||
{ font-size $ default-font-size }
|
{ font-size $ default-font-size }
|
||||||
{ table-gap { 5 5 } }
|
{ table-gap { 5 5 } }
|
||||||
{ table-border COLOR: FactorLightTan }
|
|
||||||
} help-path-style set-global
|
} help-path-style set-global
|
||||||
|
|
||||||
SYMBOL: heading-style
|
SYMBOL: heading-style
|
||||||
|
@ -69,7 +68,7 @@ H{
|
||||||
{ font-name $ default-sans-serif-font-name }
|
{ font-name $ default-sans-serif-font-name }
|
||||||
{ font-size $ font-size-heading }
|
{ font-size $ font-size-heading }
|
||||||
{ font-style bold }
|
{ font-style bold }
|
||||||
{ foreground COLOR: FactorDarkSlateBlue }
|
{ foreground $ heading-color }
|
||||||
} heading-style set-global
|
} heading-style set-global
|
||||||
|
|
||||||
SYMBOL: subsection-style
|
SYMBOL: subsection-style
|
||||||
|
@ -83,7 +82,7 @@ SYMBOL: snippet-style
|
||||||
H{
|
H{
|
||||||
{ font-name $ default-monospace-font-name }
|
{ font-name $ default-monospace-font-name }
|
||||||
{ font-size $ default-font-size }
|
{ font-size $ default-font-size }
|
||||||
{ foreground COLOR: DarkOrange4 }
|
{ foreground $ snippet-color }
|
||||||
} snippet-style set-global
|
} snippet-style set-global
|
||||||
|
|
||||||
SYMBOL: code-char-style
|
SYMBOL: code-char-style
|
||||||
|
@ -94,7 +93,7 @@ H{
|
||||||
|
|
||||||
SYMBOL: code-style
|
SYMBOL: code-style
|
||||||
H{
|
H{
|
||||||
{ page-color COLOR: FactorLightTan }
|
{ page-color $ code-background-color }
|
||||||
{ inset { 5 5 } }
|
{ inset { 5 5 } }
|
||||||
{ wrap-margin f }
|
{ wrap-margin f }
|
||||||
} code-style set-global
|
} code-style set-global
|
||||||
|
@ -102,27 +101,25 @@ H{
|
||||||
SYMBOL: output-style
|
SYMBOL: output-style
|
||||||
H{
|
H{
|
||||||
{ font-style bold }
|
{ font-style bold }
|
||||||
{ foreground COLOR: DarkOrange4 }
|
{ foreground $ output-color }
|
||||||
} output-style set-global
|
} output-style set-global
|
||||||
|
|
||||||
SYMBOL: url-style
|
SYMBOL: url-style
|
||||||
H{
|
H{
|
||||||
{ font-name $ default-monospace-font-name }
|
{ font-name $ default-monospace-font-name }
|
||||||
{ foreground COLOR: DodgerBlue4 }
|
{ foreground $ url-color }
|
||||||
} url-style set-global
|
} url-style set-global
|
||||||
|
|
||||||
SYMBOL: warning-style
|
SYMBOL: warning-style
|
||||||
H{
|
H{
|
||||||
{ page-color COLOR: gray90 }
|
{ page-color $ warning-background-color }
|
||||||
{ border-color COLOR: red }
|
|
||||||
{ inset { 5 5 } }
|
{ inset { 5 5 } }
|
||||||
{ wrap-margin $ wrap-margin-full }
|
{ wrap-margin $ wrap-margin-full }
|
||||||
} warning-style set-global
|
} warning-style set-global
|
||||||
|
|
||||||
SYMBOL: deprecated-style
|
SYMBOL: deprecated-style
|
||||||
H{
|
H{
|
||||||
{ page-color COLOR: gray90 }
|
{ page-color $ warning-background-color }
|
||||||
{ border-color COLOR: red }
|
|
||||||
{ inset { 5 5 } }
|
{ inset { 5 5 } }
|
||||||
{ wrap-margin $ wrap-margin-full }
|
{ wrap-margin $ wrap-margin-full }
|
||||||
} deprecated-style set-global
|
} deprecated-style set-global
|
||||||
|
@ -135,7 +132,7 @@ H{
|
||||||
SYMBOL: table-style
|
SYMBOL: table-style
|
||||||
H{
|
H{
|
||||||
{ table-gap { 5 5 } }
|
{ table-gap { 5 5 } }
|
||||||
{ table-border COLOR: FactorTan }
|
{ table-border $ line-color }
|
||||||
} table-style set-global
|
} table-style set-global
|
||||||
|
|
||||||
SYMBOL: list-style
|
SYMBOL: list-style
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
! Copyright (C) 2009 Slava Pestov.
|
! Copyright (C) 2009 Slava Pestov.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: accessors arrays colors.constants definitions help.markup
|
USING: accessors arrays colors.constants definitions help.markup
|
||||||
help.stylesheet io io.styles kernel literals namespaces parser random
|
help.stylesheet io io.styles kernel literals namespaces parser
|
||||||
sequences ;
|
random sequences ui.gadgets.theme ;
|
||||||
IN: help.tips
|
IN: help.tips
|
||||||
|
|
||||||
SYMBOL: tips
|
SYMBOL: tips
|
||||||
|
@ -30,7 +30,7 @@ SYNTAX: TIP:
|
||||||
SYMBOL: tip-of-the-day-style
|
SYMBOL: tip-of-the-day-style
|
||||||
|
|
||||||
H{
|
H{
|
||||||
{ page-color COLOR: lavender }
|
{ page-color $ tip-background-color }
|
||||||
{ inset { 5 5 } }
|
{ inset { 5 5 } }
|
||||||
{ wrap-margin $ wrap-margin-full }
|
{ wrap-margin $ wrap-margin-full }
|
||||||
} tip-of-the-day-style set-global
|
} tip-of-the-day-style set-global
|
||||||
|
|
|
@ -2,9 +2,10 @@
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: accessors colors colors.constants
|
USING: accessors colors colors.constants
|
||||||
combinators.short-circuit compiler.units continuations debugger
|
combinators.short-circuit compiler.units continuations debugger
|
||||||
fry io io.styles kernel lexer locals math math.parser namespaces
|
fry io io.styles kernel lexer literals locals math math.parser
|
||||||
parser parser.notes prettyprint sequences sets
|
namespaces parser parser.notes prettyprint sequences sets
|
||||||
source-files.errors system vocabs vocabs.loader vocabs.parser ;
|
source-files.errors system ui.gadgets.theme vocabs vocabs.loader
|
||||||
|
vocabs.parser ;
|
||||||
IN: listener
|
IN: listener
|
||||||
|
|
||||||
GENERIC: stream-read-quot ( stream -- quot/f )
|
GENERIC: stream-read-quot ( stream -- quot/f )
|
||||||
|
@ -16,8 +17,8 @@ GENERIC# prompt. 1 ( stream prompt -- )
|
||||||
|
|
||||||
M: object prompt.
|
M: object prompt.
|
||||||
nip H{
|
nip H{
|
||||||
{ background T{ rgba f 1 0.7 0.7 1 } }
|
{ background $ prompt-background-color }
|
||||||
{ foreground COLOR: black }
|
{ foreground $ text-color }
|
||||||
} format bl flush ;
|
} format bl flush ;
|
||||||
|
|
||||||
: parse-lines-interactive ( lines -- quot/f )
|
: parse-lines-interactive ( lines -- quot/f )
|
||||||
|
|
|
@ -1,14 +1,12 @@
|
||||||
! Copyright (C) 2009 Keith Lazuka, Slava Pestov.
|
! Copyright (C) 2009 Keith Lazuka, Slava Pestov.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! 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
|
combinators.short-circuit hashtables io.styles kernel literals
|
||||||
namespaces sequences words words.symbol ;
|
namespaces sequences ui.gadgets.theme words words.symbol ;
|
||||||
IN: prettyprint.stylesheet
|
IN: prettyprint.stylesheet
|
||||||
|
|
||||||
<PRIVATE
|
<PRIVATE
|
||||||
|
|
||||||
CONSTANT: dim-color COLOR: gray35
|
|
||||||
|
|
||||||
{ POSTPONE: USING: POSTPONE: USE: POSTPONE: IN: }
|
{ POSTPONE: USING: POSTPONE: USE: POSTPONE: IN: }
|
||||||
[
|
[
|
||||||
{ { foreground $ dim-color } }
|
{ { foreground $ dim-color } }
|
||||||
|
@ -27,7 +25,7 @@ M: word word-style
|
||||||
|
|
||||||
M: highlighted-word word-style
|
M: highlighted-word word-style
|
||||||
call-next-method
|
call-next-method
|
||||||
COLOR: DarkSlateGray foreground pick set-at ;
|
highlighted-word-color foreground pick set-at ;
|
||||||
|
|
||||||
<PRIVATE
|
<PRIVATE
|
||||||
|
|
||||||
|
@ -40,7 +38,7 @@ M: highlighted-word word-style
|
||||||
PRIVATE>
|
PRIVATE>
|
||||||
|
|
||||||
: string-style ( str -- style )
|
: string-style ( str -- style )
|
||||||
COLOR: LightSalmon4 colored-presentation-style ;
|
string-color colored-presentation-style ;
|
||||||
|
|
||||||
: vocab-style ( vocab -- style )
|
: vocab-style ( vocab -- style )
|
||||||
dim-color colored-presentation-style ;
|
dim-color colored-presentation-style ;
|
||||||
|
@ -48,7 +46,7 @@ PRIVATE>
|
||||||
SYMBOL: stack-effect-style
|
SYMBOL: stack-effect-style
|
||||||
|
|
||||||
H{
|
H{
|
||||||
{ foreground COLOR: FactorDarkGreen }
|
{ foreground $ stack-effect-color }
|
||||||
{ font-style plain }
|
{ font-style plain }
|
||||||
} stack-effect-style set-global
|
} stack-effect-style set-global
|
||||||
|
|
||||||
|
|
|
@ -609,7 +609,7 @@ TUPLE: field < border editor min-cols max-cols ;
|
||||||
: field-theme ( gadget -- gadget )
|
: field-theme ( gadget -- gadget )
|
||||||
{ 2 2 } >>size
|
{ 2 2 } >>size
|
||||||
{ 1 0 } >>fill
|
{ 1 0 } >>fill
|
||||||
COLOR: gray <solid> >>boundary ; inline
|
field-border-color <solid> >>boundary ; inline
|
||||||
|
|
||||||
: <field-border> ( gadget -- border )
|
: <field-border> ( gadget -- border )
|
||||||
border new-border field-theme ;
|
border new-border field-theme ;
|
||||||
|
|
|
@ -51,7 +51,7 @@ PRIVATE>
|
||||||
add-content-area ;
|
add-content-area ;
|
||||||
|
|
||||||
: <framed-labeled> ( gadget title color -- labeled )
|
: <framed-labeled> ( gadget title color -- labeled )
|
||||||
<labeled> COLOR: grey85 <solid> >>boundary ;
|
<labeled> labeled-border-color <solid> >>boundary ;
|
||||||
|
|
||||||
: <labeled-gadget> ( gadget title -- labeled )
|
: <labeled-gadget> ( gadget title -- labeled )
|
||||||
vertical labeled-gadget new-track with-lines
|
vertical labeled-gadget new-track with-lines
|
||||||
|
@ -62,5 +62,5 @@ PRIVATE>
|
||||||
{ 5 5 } <border>
|
{ 5 5 } <border>
|
||||||
content-background <solid> >>interior
|
content-background <solid> >>interior
|
||||||
1 track-add
|
1 track-add
|
||||||
COLOR: grey85 <solid> >>boundary
|
labeled-border-color <solid> >>boundary
|
||||||
{ 3 3 } <border> ;
|
{ 3 3 } <border> ;
|
||||||
|
|
|
@ -150,15 +150,3 @@ M: gadget draw-children
|
||||||
[ draw-gadget ] each
|
[ draw-gadget ] each
|
||||||
] with-scope
|
] with-scope
|
||||||
] [ drop ] if ;
|
] [ 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
|
|
||||||
|
|
|
@ -32,7 +32,7 @@ TUPLE: links-popup < wrapper ;
|
||||||
30 >>max-cols ;
|
30 >>max-cols ;
|
||||||
|
|
||||||
: <links-popup> ( model quot title -- gadget )
|
: <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 ;
|
popup-color <labeled> links-popup new-wrapper ;
|
||||||
|
|
||||||
links-popup H{
|
links-popup H{
|
||||||
|
|
|
@ -148,7 +148,7 @@ GENERIC# accept-completion-hook 1 ( item popup -- )
|
||||||
dup '[ _ accept-completion ] >>action ;
|
dup '[ _ accept-completion ] >>action ;
|
||||||
|
|
||||||
: <completion-scroller> ( completion-popup -- scroller )
|
: <completion-scroller> ( completion-popup -- scroller )
|
||||||
table>> <scroller> COLOR: white <solid> >>interior ;
|
table>> <scroller> content-background <solid> >>interior ;
|
||||||
|
|
||||||
: <completion-popup> ( interactor completion-mode -- popup )
|
: <completion-popup> ( interactor completion-mode -- popup )
|
||||||
[ vertical completion-popup new-track ] 2dip
|
[ vertical completion-popup new-track ] 2dip
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
! Copyright (C) 2009 Slava Pestov.
|
! Copyright (C) 2009 Slava Pestov.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: accessors arrays assocs colors colors.constants fry io
|
USING: accessors arrays assocs colors fry io
|
||||||
io.styles kernel make math.order namespaces parser
|
io.styles kernel literals make math.order namespaces parser
|
||||||
prettyprint.backend prettyprint.sections prettyprint.stylesheet
|
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 ;
|
FROM: io.styles => inset ;
|
||||||
IN: vocabs.prettyprint
|
IN: vocabs.prettyprint
|
||||||
|
|
||||||
|
@ -91,8 +91,8 @@ PRIVATE>
|
||||||
"at the top of the source file:" print nl
|
"at the top of the source file:" print nl
|
||||||
] with-style
|
] with-style
|
||||||
{
|
{
|
||||||
{ page-color COLOR: FactorLightTan }
|
{ page-color $ vocab-background-color }
|
||||||
{ border-color COLOR: FactorDarkTan }
|
{ border-color $ vocab-border-color }
|
||||||
{ inset { 5 5 } }
|
{ inset { 5 5 } }
|
||||||
} [ manifest get pprint-manifest ] with-nesting
|
} [ manifest get pprint-manifest ] with-nesting
|
||||||
nl nl
|
nl nl
|
||||||
|
|
Loading…
Reference in New Issue