diff --git a/basis/help/stylesheet/stylesheet.factor b/basis/help/stylesheet/stylesheet.factor index 0b64ae07f2..dd2f4f8c6c 100644 --- a/basis/help/stylesheet/stylesheet.factor +++ b/basis/help/stylesheet/stylesheet.factor @@ -26,6 +26,7 @@ SYMBOL: default-span-style H{ { font-name $ default-sans-serif-font-name } { font-size $ font-size-span } + { foreground $ text-color } { font-style plain } } default-span-style set-global diff --git a/basis/prettyprint/stylesheet/stylesheet.factor b/basis/prettyprint/stylesheet/stylesheet.factor index b11abc9293..225d0e5da9 100644 --- a/basis/prettyprint/stylesheet/stylesheet.factor +++ b/basis/prettyprint/stylesheet/stylesheet.factor @@ -21,7 +21,8 @@ GENERIC: word-style ( word -- style ) M: word word-style [ presented associate ] - [ "word-style" word-prop ] bi assoc-union! ; + [ "word-style" word-prop ] bi assoc-union! + text-color foreground pick set-at ; M: highlighted-word word-style call-next-method diff --git a/basis/ui/gadgets/buttons/buttons.factor b/basis/ui/gadgets/buttons/buttons.factor index 123ecc6e93..dc8abd016c 100644 --- a/basis/ui/gadgets/buttons/buttons.factor +++ b/basis/ui/gadgets/buttons/buttons.factor @@ -134,7 +134,7 @@ PRIVATE> ; : border-button-label-theme ( gadget -- ) - dup label? [ [ clone t >>bold? ] change-font ] when drop ; + dup label? [ [ clone t >>bold? text-color >>foreground ] change-font ] when drop ; : border-button-theme ( gadget -- gadget ) dup gadget-child border-button-label-theme diff --git a/basis/ui/gadgets/labeled/labeled.factor b/basis/ui/gadgets/labeled/labeled.factor index 9c6b3f208f..acdaef69ad 100644 --- a/basis/ui/gadgets/labeled/labeled.factor +++ b/basis/ui/gadgets/labeled/labeled.factor @@ -21,7 +21,7 @@ M: labeled-gadget focusable-child* content>> ; : add-title-bar ( title track -- track ) swap >label - [ t >>bold? ] change-font + [ t >>bold? text-color >>foreground ] change-font { 0 4 } title-bar-interior >>interior f track-add ; diff --git a/basis/ui/gadgets/labels/labels.factor b/basis/ui/gadgets/labels/labels.factor index 38fb92e1f0..998bfb538a 100644 --- a/basis/ui/gadgets/labels/labels.factor +++ b/basis/ui/gadgets/labels/labels.factor @@ -3,7 +3,7 @@ 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.pens.solid ui.render ui.text ui.tools.common ; IN: ui.gadgets.labels ! A label gadget draws a string. @@ -92,7 +92,7 @@ M: label-control model-changed swap >>model ; : text-theme ( gadget -- gadget ) - monospace-font >>font ; + monospace-font >>font theme-font-colors ; : reverse-video-theme ( label -- label ) sans-serif-font reverse-video-font >>font diff --git a/basis/ui/tools/browser/browser.factor b/basis/ui/tools/browser/browser.factor index 1585652946..8f284f93e7 100644 --- a/basis/ui/tools/browser/browser.factor +++ b/basis/ui/tools/browser/browser.factor @@ -101,6 +101,7 @@ CONSTANT: next 1 : ( browser -- field ) '[ _ search-browser ] + [ theme-font-colors ] change-editor "Search" >>default-text 10 >>min-cols 10 >>max-cols diff --git a/basis/ui/tools/common/common.factor b/basis/ui/tools/common/common.factor index 32663738dc..4a74aca5e9 100644 --- a/basis/ui/tools/common/common.factor +++ b/basis/ui/tools/common/common.factor @@ -49,3 +49,6 @@ SLOT: scroller : white-interior ( track -- track ) content-background >>interior ; + +: theme-font-colors ( gadget -- gadget ) + [ content-background >>background text-color >>foreground ] change-font ; diff --git a/basis/ui/tools/debugger/debugger.factor b/basis/ui/tools/debugger/debugger.factor index 765bed7841..10450a4cc8 100644 --- a/basis/ui/tools/debugger/debugger.factor +++ b/basis/ui/tools/debugger/debugger.factor @@ -36,7 +36,7 @@ M: restart-renderer row-columns [ error>> add-gadget ] [ dup restart-hook>> [ - [ "To continue, pick one of the options below:"