From: Alex Maestas Date: Fri, 12 Aug 2022 06:10:12 +0000 (+0000) Subject: Add Wombat theme, put it and Base16 theme in OS X menu X-Git-Tag: 0.99~1134 X-Git-Url: https://gitweb.factorcode.org/gitweb.cgi?p=factor.git;a=commitdiff_plain;h=f16f97ba5905e285d914a9e0dc9291728c6d2c06 Add Wombat theme, put it and Base16 theme in OS X menu --- diff --git a/Factor.app/Contents/Resources/English.lproj/Factor.nib/designable.nib b/Factor.app/Contents/Resources/English.lproj/Factor.nib/designable.nib index 74aa0193e2..e5b14f8bba 100644 --- a/Factor.app/Contents/Resources/English.lproj/Factor.nib/designable.nib +++ b/Factor.app/Contents/Resources/English.lproj/Factor.nib/designable.nib @@ -1,8 +1,8 @@ - - + + - + @@ -235,6 +235,18 @@ + + + + + + + + + + + + @@ -277,6 +289,7 @@ + diff --git a/Factor.app/Contents/Resources/English.lproj/Factor.nib/keyedobjects.nib b/Factor.app/Contents/Resources/English.lproj/Factor.nib/keyedobjects.nib index 67eedf8402..d5fe8592c7 100644 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 diff --git a/basis/ui/backend/cocoa/tools/tools.factor b/basis/ui/backend/cocoa/tools/tools.factor index feed1a53dc..482330f849 100644 --- a/basis/ui/backend/cocoa/tools/tools.factor +++ b/basis/ui/backend/cocoa/tools/tools.factor @@ -45,6 +45,10 @@ IN: ui.backend.cocoa.tools METHOD: id switchDarkTheme: id app [ dark-mode f ] ; + METHOD: id switchWombatTheme: id app [ wombat-mode f ] ; + + METHOD: id switchBase16Theme: id app [ base16-mode f ] ; + METHOD: id refreshAll: id app [ [ refresh-all ] \ refresh-all call-listener f ] ; ;CLASS> diff --git a/basis/ui/theme/switching/switching.factor b/basis/ui/theme/switching/switching.factor index 9b22efc363..2e68a99911 100644 --- a/basis/ui/theme/switching/switching.factor +++ b/basis/ui/theme/switching/switching.factor @@ -1,7 +1,7 @@ ! Copyright (C) 2016 Nicolas Pénet. ! See http://factorcode.org/license.txt for BSD license. -USING: hashtables kernel namespaces sequences ui.theme -vocabs.loader ; +USING: hashtables kernel namespaces sequences ui.theme ui.theme.base16 +ui.theme.wombat vocabs.loader ; IN: ui.theme.switching SYMBOL: default-theme? @@ -26,4 +26,8 @@ t default-theme? set-global : dark-mode ( -- ) dark-theme switch-theme ; +: wombat-mode ( -- ) wombat-theme switch-theme ; + +: base16-mode ( -- ) base16-theme switch-theme ; + { "ui.theme.switching" "ui.tools" } "ui.theme.switching.tools" require-when diff --git a/basis/ui/theme/wombat/authors.txt b/basis/ui/theme/wombat/authors.txt new file mode 100644 index 0000000000..d514ff4aab --- /dev/null +++ b/basis/ui/theme/wombat/authors.txt @@ -0,0 +1 @@ +Alex Maestas diff --git a/basis/ui/theme/wombat/summary.txt b/basis/ui/theme/wombat/summary.txt new file mode 100644 index 0000000000..40faf8fada --- /dev/null +++ b/basis/ui/theme/wombat/summary.txt @@ -0,0 +1 @@ +Port of the Wombat theme from Emacs and Vim diff --git a/basis/ui/theme/wombat/wombat.factor b/basis/ui/theme/wombat/wombat.factor new file mode 100644 index 0000000000..4a156d5225 --- /dev/null +++ b/basis/ui/theme/wombat/wombat.factor @@ -0,0 +1,95 @@ +USING: colors ui.theme ; +IN: ui.theme.wombat +SINGLETON: wombat-theme + +! This is a port of the `wombat` theme from emacs, adapted with permission from +! Kristoffer Grönlund, who, in turn, adapted it from the Vim color scheme by +! Lars H. Nielsen. + +M: wombat-theme toolbar-background COLOR: #454545 ; +M: wombat-theme toolbar-button-pressed-background COLOR: #242424 ; + +M: wombat-theme menu-background COLOR: #384048 ; +M: wombat-theme menu-border-color COLOR: #a0a8b0 ; + +M: wombat-theme status-bar-background COLOR: #384048 ; +M: wombat-theme status-bar-foreground COLOR: white ; + +M: wombat-theme button-text-color COLOR: #303030 ; +M: wombat-theme button-clicked-text-color COLOR: white ; + +M: wombat-theme line-color COLOR: #656565 ; + +M: wombat-theme column-title-background COLOR: #384048 ; + +M: wombat-theme roll-button-rollover-border COLOR: #a0a8b0 ; +M: wombat-theme roll-button-selected-background COLOR: #a0a8b0 ; + +M: wombat-theme source-files-color COLOR: #95e454 ; +M: wombat-theme errors-color COLOR: #e5786d ; +M: wombat-theme details-color COLOR: #8ac6f2 ; + +M: wombat-theme debugger-color COLOR: #e5786d ; +M: wombat-theme completion-color COLOR: #3f9f9e ; + +M: wombat-theme data-stack-color COLOR: #8ac6f2 ; +M: wombat-theme retain-stack-color COLOR: #95e454 ; +M: wombat-theme call-stack-color COLOR: #3f9f9e ; + +M: wombat-theme title-bar-gradient { COLOR: #242424 COLOR: #454545 } ; + +M: wombat-theme popup-color COLOR: #ddaa6f ; + +M: wombat-theme object-color COLOR: #8ac6f2 ; +M: wombat-theme contents-color COLOR: #95e454 ; + +M: wombat-theme help-header-background COLOR: #384048 ; + +M: wombat-theme thread-status-stopped-background COLOR: #333333 ; +M: wombat-theme thread-status-suspended-background COLOR: #242424 ; +M: wombat-theme thread-status-running-background COLOR: #444444 ; + +M: wombat-theme thread-status-stopped-foreground COLOR: #8ac6f2 ; +M: wombat-theme thread-status-suspended-foreground COLOR: #ddaa6f ; +M: wombat-theme thread-status-running-foreground COLOR: #95e454 ; + +M: wombat-theme error-summary-background COLOR: #b85149 ; + +M: wombat-theme content-background COLOR: #242424 ; +M: wombat-theme text-color COLOR: #f6f3e9 ; + +M: wombat-theme link-color COLOR: #8ac6f2 ; +M: wombat-theme title-color COLOR: #a0a8b0 ; +M: wombat-theme heading-color COLOR: #a0a8b0 ; +M: wombat-theme snippet-color COLOR: #e5786d ; +M: wombat-theme output-color COLOR: #e5786d ; +M: wombat-theme deprecated-background-color COLOR: #454545 ; +M: wombat-theme deprecated-border-color COLOR: #92a65e ; +M: wombat-theme warning-background-color COLOR: #454545 ; +M: wombat-theme warning-border-color COLOR: #8ac6f2 ; +M: wombat-theme code-background-color COLOR: #303030 ; +M: wombat-theme code-border-color COLOR: white ; +M: wombat-theme help-path-border-color COLOR: #384048 ; + +M: wombat-theme tip-background-color COLOR: #303030 ; + +M: wombat-theme prompt-background-color COLOR: #92a65e ; + +M: wombat-theme dim-color COLOR: #8ac6f2 ; +M: wombat-theme highlighted-word-color COLOR: #95e454 ; +M: wombat-theme string-color COLOR: #95e454 ; +M: wombat-theme stack-effect-color COLOR: #e5786d ; + +M: wombat-theme vocab-background-color COLOR: #303030 ; +M: wombat-theme vocab-border-color COLOR: #a0a8b0 ; + +M: wombat-theme field-border-color COLOR: #a0a8b0 ; + +M: wombat-theme editor-caret-color COLOR: #92a65e ; +M: wombat-theme selection-color COLOR: #444444 ; +M: wombat-theme panel-background-color COLOR: #444444 ; +M: wombat-theme focus-border-color COLOR: #a0a8b0 ; + +M: wombat-theme labeled-border-color COLOR: #303030 ; + +M: wombat-theme table-border-color COLOR: #a0a8b0 ;