Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes circularity and adds theme switching to Mac menu. Could use some simplification and reduction in color theme hooks.
- Loading branch information
Showing
28 changed files
with
430 additions
and
150 deletions.
There are no files selected for viewing
38 changes: 0 additions & 38 deletions
38
Factor.app/Contents/Resources/English.lproj/Factor.nib/classes.nib
This file was deleted.
Oops, something went wrong.
282 changes: 282 additions & 0 deletions
282
Factor.app/Contents/Resources/English.lproj/Factor.nib/designable.nib
Large diffs are not rendered by default.
Oops, something went wrong.
16 changes: 0 additions & 16 deletions
16
Factor.app/Contents/Resources/English.lproj/Factor.nib/info.nib
This file was deleted.
Oops, something went wrong.
Binary file modified
BIN
-2.39 KB
(84%)
Factor.app/Contents/Resources/English.lproj/Factor.nib/keyedobjects.nib
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,55 +1,60 @@ | ||
! 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 | ||
namespaces sequences ui.theme words words.symbol ; | ||
namespaces sequences words words.symbol ; | ||
IN: prettyprint.stylesheet | ||
|
||
<PRIVATE | ||
|
||
{ POSTPONE: USING: POSTPONE: USE: POSTPONE: IN: } | ||
[ | ||
{ { foreground $ dim-color } } | ||
{ { foreground COLOR: gray35 } } | ||
"word-style" set-word-prop | ||
] each | ||
|
||
PREDICATE: highlighted-word < word [ parsing-word? ] [ delimiter? ] bi or ; | ||
|
||
PRIVATE> | ||
|
||
SYMBOL: base-word-style | ||
H{ } base-word-style set-global | ||
|
||
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-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 ) | ||
dim-color colored-presentation-style ; | ||
presented base-vocab-style get clone [ set-at ] keep ; | ||
|
||
SYMBOL: stack-effect-style | ||
|
||
H{ | ||
{ foreground $ stack-effect-color } | ||
{ foreground COLOR: FactorDarkGreen } | ||
{ 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 ; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,10 @@ | ||
! 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> ; | ||
|
||
: theme-font-colors ( gadget -- gadget ) | ||
[ content-background >>background text-color >>foreground ] change-font ; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,57 @@ | ||
! 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 ( -- ) | ||
|
||
! help.stylesheet | ||
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) | ||
url-style url-color foreground (update-style) | ||
url-style link-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) | ||
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) | ||
|
||
! ui.tools.listener | ||
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 ; |
Oops, something went wrong.