From 85ba970bed2dc0c3971b85754915042bb5f2a140 Mon Sep 17 00:00:00 2001
From: nicolas-p <z.nicolas@gmail.com>
Date: Thu, 5 May 2016 22:07:22 +0200
Subject: [PATCH] Renaming themes

---
 basis/ui/gadgets/theme/dark/dark.factor       | 110 +++++++++---------
 basis/ui/gadgets/theme/light/light.factor     | 110 +++++++++---------
 .../gadgets/theme/switching/switching.factor  |   6 +-
 basis/ui/gadgets/theme/theme.factor           |   6 +-
 4 files changed, 116 insertions(+), 116 deletions(-)

diff --git a/basis/ui/gadgets/theme/dark/dark.factor b/basis/ui/gadgets/theme/dark/dark.factor
index a14b2d1500..67e19ad29b 100644
--- a/basis/ui/gadgets/theme/dark/dark.factor
+++ b/basis/ui/gadgets/theme/dark/dark.factor
@@ -4,85 +4,85 @@ USING: accessors colors colors.constants colors.hex
 ui.gadgets.theme ui.pens.solid ;
 IN: ui.gadgets.theme.dark
 
-M: dark toolbar-background COLOR: solarized-base02 ;
-M: dark toolbar-button-pressed-background COLOR: solarized-base0 ;
+M: dark-theme toolbar-background COLOR: solarized-base02 ;
+M: dark-theme toolbar-button-pressed-background COLOR: solarized-base0 ;
 
-M: dark menu-background COLOR: solarized-base02 ;
-M: dark menu-border-color COLOR: solarized-base01 ;
+M: dark-theme menu-background COLOR: solarized-base02 ;
+M: dark-theme menu-border-color COLOR: solarized-base01 ;
 
-M: dark status-bar-background COLOR: FactorDarkSlateBlue ;
-M: dark status-bar-foreground COLOR: white ;
+M: dark-theme status-bar-background COLOR: FactorDarkSlateBlue ;
+M: dark-theme status-bar-foreground COLOR: white ;
 
-M: dark button-text-color COLOR: solarized-base1 ;
-M: dark button-clicked-text-color COLOR: white ;
+M: dark-theme button-text-color COLOR: solarized-base1 ;
+M: dark-theme button-clicked-text-color COLOR: white ;
 
-M: dark line-color COLOR: solarized-base01 ;
+M: dark-theme line-color COLOR: solarized-base01 ;
 
-M: dark column-title-background COLOR: solarized-base01 ;
+M: dark-theme column-title-background COLOR: solarized-base01 ;
 
-M: dark roll-button-rollover-border COLOR: gray50 ;
-M: dark roll-button-selected-background COLOR: dark-gray ;
+M: dark-theme roll-button-rollover-border COLOR: gray50 ;
+M: dark-theme roll-button-selected-background COLOR: dark-gray ;
 
-M: dark source-files-color COLOR: solarized-green ;
-M: dark errors-color COLOR: solarized-red ;
-M: dark details-color COLOR: solarized-blue ;
+M: dark-theme source-files-color COLOR: solarized-green ;
+M: dark-theme errors-color COLOR: solarized-red ;
+M: dark-theme details-color COLOR: solarized-blue ;
 
-M: dark debugger-color COLOR: solarized-red ;
-M: dark completion-color COLOR: solarized-violet ;
+M: dark-theme debugger-color COLOR: solarized-red ;
+M: dark-theme completion-color COLOR: solarized-violet ;
 
-M: dark data-stack-color COLOR: solarized-blue ;
-M: dark retain-stack-color COLOR: solarized-magenta ;
-M: dark call-stack-color COLOR: solarized-green ;
+M: dark-theme data-stack-color COLOR: solarized-blue ;
+M: dark-theme retain-stack-color COLOR: solarized-magenta ;
+M: dark-theme call-stack-color COLOR: solarized-green ;
 
-M: dark title-bar-gradient { COLOR: solarized-base01 COLOR: solarized-base02 } ;
+M: dark-theme title-bar-gradient { COLOR: solarized-base01 COLOR: solarized-base02 } ;
 
-M: dark popup-color COLOR: solarized-yellow ;
+M: dark-theme popup-color COLOR: solarized-yellow ;
 
-M: dark object-color COLOR: solarized-cyan ;
-M: dark contents-color COLOR: solarized-magenta ;
+M: dark-theme object-color COLOR: solarized-cyan ;
+M: dark-theme contents-color COLOR: solarized-magenta ;
 
-M: dark help-header-background HEXCOLOR: 2F4D5B ;
+M: dark-theme help-header-background HEXCOLOR: 2F4D5B ;
 
-M: dark thread-status-stopped-background HEXCOLOR: 492d33 ;
-M: dark thread-status-suspended-background HEXCOLOR: 3c4a24 ;
-M: dark thread-status-running-background HEXCOLOR: 2c4f24 ;
+M: dark-theme thread-status-stopped-background HEXCOLOR: 492d33 ;
+M: dark-theme thread-status-suspended-background HEXCOLOR: 3c4a24 ;
+M: dark-theme thread-status-running-background HEXCOLOR: 2c4f24 ;
 
-M: dark thread-status-stopped-foreground COLOR: solarized-red ;
-M: dark thread-status-suspended-foreground COLOR: solarized-yellow ;
-M: dark thread-status-running-foreground COLOR: solarized-green ;
+M: dark-theme thread-status-stopped-foreground COLOR: solarized-red ;
+M: dark-theme thread-status-suspended-foreground COLOR: solarized-yellow ;
+M: dark-theme thread-status-running-foreground COLOR: solarized-green ;
 
-M: dark error-summary-background HEXCOLOR: 6E2E32 ;
+M: dark-theme error-summary-background HEXCOLOR: 6E2E32 ;
 
-M: dark content-background COLOR: solarized-base03 ;
-M: dark text-color COLOR: grey75 ;
+M: dark-theme content-background COLOR: solarized-base03 ;
+M: dark-theme text-color COLOR: grey75 ;
 
-M: dark link-color COLOR: solarized-blue ;
-M: dark url-color COLOR: solarized-blue ;
-M: dark title-color COLOR: grey75 ;
-M: dark heading-color COLOR: grey75 ;
-M: dark snippet-color COLOR: solarized-orange ;
-M: dark output-color COLOR: solarized-orange ;
-M: dark warning-background-color HEXCOLOR: 6E2E32 ;
-M: dark code-background-color HEXCOLOR: 2F4D5B ;
+M: dark-theme link-color COLOR: solarized-blue ;
+M: dark-theme url-color COLOR: solarized-blue ;
+M: dark-theme title-color COLOR: grey75 ;
+M: dark-theme heading-color COLOR: grey75 ;
+M: dark-theme snippet-color COLOR: solarized-orange ;
+M: dark-theme output-color COLOR: solarized-orange ;
+M: dark-theme warning-background-color HEXCOLOR: 6E2E32 ;
+M: dark-theme code-background-color HEXCOLOR: 2F4D5B ;
 
-M: dark tip-background-color HEXCOLOR: 2F4D5B ;
+M: dark-theme tip-background-color HEXCOLOR: 2F4D5B ;
 
-M: dark prompt-background-color HEXCOLOR: 922f31 ;
+M: dark-theme prompt-background-color HEXCOLOR: 922f31 ;
 
-M: dark dim-color COLOR: solarized-cyan ;
-M: dark highlighted-word-color COLOR: solarized-green ;
-M: dark string-color COLOR: solarized-magenta ;
-M: dark stack-effect-color COLOR: solarized-orange ;
+M: dark-theme dim-color COLOR: solarized-cyan ;
+M: dark-theme highlighted-word-color COLOR: solarized-green ;
+M: dark-theme string-color COLOR: solarized-magenta ;
+M: dark-theme stack-effect-color COLOR: solarized-orange ;
 
-M: dark vocab-background-color COLOR: solarized-base01 ;
-M: dark vocab-border-color COLOR: solarized-base01 ;
+M: dark-theme vocab-background-color COLOR: solarized-base01 ;
+M: dark-theme vocab-border-color COLOR: solarized-base01 ;
 
-M: dark field-border-color COLOR: solarized-base01 ;
+M: dark-theme field-border-color COLOR: solarized-base01 ;
 
-M: dark selection-color COLOR: solarized-base01 ;
+M: dark-theme selection-color COLOR: solarized-base01 ;
 
-M: dark panel-background-color T{ rgba f 0.7843 0.7686 0.7176 1.0 } ;
+M: dark-theme panel-background-color T{ rgba f 0.7843 0.7686 0.7176 1.0 } ;
 
-M: dark focus-border-color COLOR: solarized-base01 ;
+M: dark-theme focus-border-color COLOR: solarized-base01 ;
 
-M: dark labeled-border-color COLOR: grey85 ;
+M: dark-theme labeled-border-color COLOR: grey85 ;
diff --git a/basis/ui/gadgets/theme/light/light.factor b/basis/ui/gadgets/theme/light/light.factor
index 3cbfecc80e..77caa880f8 100644
--- a/basis/ui/gadgets/theme/light/light.factor
+++ b/basis/ui/gadgets/theme/light/light.factor
@@ -4,85 +4,85 @@ USING: accessors colors colors.constants colors.hex
 ui.gadgets.theme ui.pens.solid ;
 IN: ui.gadgets.theme.light
 
-M: light toolbar-background COLOR: grey95 ;
-M: light toolbar-button-pressed-background COLOR: dark-gray ;
+M: light-theme toolbar-background COLOR: grey95 ;
+M: light-theme toolbar-button-pressed-background COLOR: dark-gray ;
 
-M: light menu-background COLOR: grey95 ;
-M: light menu-border-color COLOR: grey75 ;
+M: light-theme menu-background COLOR: grey95 ;
+M: light-theme menu-border-color COLOR: grey75 ;
 
-M: light status-bar-background COLOR: FactorDarkSlateBlue ;
-M: light status-bar-foreground COLOR: white ;
+M: light-theme status-bar-background COLOR: FactorDarkSlateBlue ;
+M: light-theme status-bar-foreground COLOR: white ;
 
-M: light button-text-color COLOR: FactorDarkSlateBlue ;
-M: light button-clicked-text-color COLOR: white ;
+M: light-theme button-text-color COLOR: FactorDarkSlateBlue ;
+M: light-theme button-clicked-text-color COLOR: white ;
 
-M: light line-color COLOR: grey75 ;
+M: light-theme line-color COLOR: grey75 ;
 
-M: light column-title-background COLOR: grey95 ;
+M: light-theme column-title-background COLOR: grey95 ;
 
-M: light roll-button-rollover-border COLOR: gray50 ;
-M: light roll-button-selected-background COLOR: dark-gray ;
+M: light-theme roll-button-rollover-border COLOR: gray50 ;
+M: light-theme roll-button-selected-background COLOR: dark-gray ;
 
-M: light source-files-color COLOR: MediumSeaGreen ;
-M: light errors-color COLOR: chocolate1 ;
-M: light details-color COLOR: SteelBlue3 ;
+M: light-theme source-files-color COLOR: MediumSeaGreen ;
+M: light-theme errors-color COLOR: chocolate1 ;
+M: light-theme details-color COLOR: SteelBlue3 ;
 
-M: light debugger-color COLOR: chocolate1 ;
-M: light completion-color COLOR: magenta ;
+M: light-theme debugger-color COLOR: chocolate1 ;
+M: light-theme completion-color COLOR: magenta ;
 
-M: light data-stack-color COLOR: DodgerBlue ;
-M: light retain-stack-color COLOR: HotPink ;
-M: light call-stack-color COLOR: GreenYellow ;
+M: light-theme data-stack-color COLOR: DodgerBlue ;
+M: light-theme retain-stack-color COLOR: HotPink ;
+M: light-theme call-stack-color COLOR: GreenYellow ;
 
-M: light title-bar-gradient { COLOR: white COLOR: grey90 } ;
+M: light-theme title-bar-gradient { COLOR: white COLOR: grey90 } ;
 
-M: light popup-color COLOR: yellow2 ;
+M: light-theme popup-color COLOR: yellow2 ;
 
-M: light object-color COLOR: aquamarine2 ;
-M: light contents-color COLOR: orchid2 ;
+M: light-theme object-color COLOR: aquamarine2 ;
+M: light-theme contents-color COLOR: orchid2 ;
 
-M: light help-header-background HEXCOLOR: F4EFD9 ;
+M: light-theme help-header-background HEXCOLOR: F4EFD9 ;
 
-M: light thread-status-stopped-background HEXCOLOR: F4D9D9 ;
-M: light thread-status-suspended-background HEXCOLOR: F4EAD9 ;
-M: light thread-status-running-background HEXCOLOR: EDF4D9 ;
+M: light-theme thread-status-stopped-background HEXCOLOR: F4D9D9 ;
+M: light-theme thread-status-suspended-background HEXCOLOR: F4EAD9 ;
+M: light-theme thread-status-running-background HEXCOLOR: EDF4D9 ;
 
-M: light thread-status-stopped-foreground HEXCOLOR: F42300 ;
-M: light thread-status-suspended-foreground HEXCOLOR: F37B00 ;
-M: light thread-status-running-foreground HEXCOLOR: 3FCA00 ;
+M: light-theme thread-status-stopped-foreground HEXCOLOR: F42300 ;
+M: light-theme thread-status-suspended-foreground HEXCOLOR: F37B00 ;
+M: light-theme thread-status-running-foreground HEXCOLOR: 3FCA00 ;
 
-M: light error-summary-background HEXCOLOR: F4D9D9 ;
+M: light-theme error-summary-background HEXCOLOR: F4D9D9 ;
 
-M: light content-background COLOR: white ;
-M: light text-color COLOR: black ;
+M: light-theme content-background COLOR: white ;
+M: light-theme text-color COLOR: black ;
 
-M: light link-color COLOR: DodgerBlue4 ;
-M: light url-color COLOR: DodgerBlue4 ;
-M: light title-color COLOR: gray20 ;
-M: light heading-color COLOR: FactorDarkSlateBlue ;
-M: light snippet-color COLOR: DarkOrange4 ;
-M: light output-color COLOR: DarkOrange4 ;
-M: light warning-background-color COLOR: gray90 ;
-M: light code-background-color COLOR: FactorLightTan ;
+M: light-theme link-color COLOR: DodgerBlue4 ;
+M: light-theme url-color COLOR: DodgerBlue4 ;
+M: light-theme title-color COLOR: gray20 ;
+M: light-theme heading-color COLOR: FactorDarkSlateBlue ;
+M: light-theme snippet-color COLOR: DarkOrange4 ;
+M: light-theme output-color COLOR: DarkOrange4 ;
+M: light-theme warning-background-color COLOR: gray90 ;
+M: light-theme code-background-color COLOR: FactorLightTan ;
 
-M: light tip-background-color COLOR: lavender ;
+M: light-theme tip-background-color COLOR: lavender ;
 
-M: light prompt-background-color T{ rgba f 1 0.7 0.7 1 } ;
+M: light-theme prompt-background-color T{ rgba f 1 0.7 0.7 1 } ;
 
-M: light dim-color COLOR: gray35 ;
-M: light highlighted-word-color COLOR: DarkSlateGray ;
-M: light string-color COLOR: LightSalmon4 ;
-M: light stack-effect-color COLOR: FactorDarkGreen ;
+M: light-theme dim-color COLOR: gray35 ;
+M: light-theme highlighted-word-color COLOR: DarkSlateGray ;
+M: light-theme string-color COLOR: LightSalmon4 ;
+M: light-theme stack-effect-color COLOR: FactorDarkGreen ;
 
-M: light vocab-background-color COLOR: FactorLightTan ;
-M: light vocab-border-color COLOR: FactorDarkTan ;
+M: light-theme vocab-background-color COLOR: FactorLightTan ;
+M: light-theme vocab-border-color COLOR: FactorDarkTan ;
 
-M: light field-border-color COLOR: gray ;
+M: light-theme field-border-color COLOR: gray ;
 
-M: light selection-color T{ rgba f 0.8 0.8 1.0 1.0 } ;
+M: light-theme selection-color T{ rgba f 0.8 0.8 1.0 1.0 } ;
 
-M: light panel-background-color T{ rgba f 0.7843 0.7686 0.7176 1.0 } ;
+M: light-theme panel-background-color T{ rgba f 0.7843 0.7686 0.7176 1.0 } ;
 
-M: light focus-border-color COLOR: dark-gray ;
+M: light-theme focus-border-color COLOR: dark-gray ;
 
-M: light labeled-border-color COLOR: grey85 ;
+M: light-theme labeled-border-color COLOR: grey85 ;
diff --git a/basis/ui/gadgets/theme/switching/switching.factor b/basis/ui/gadgets/theme/switching/switching.factor
index a418beae57..bc0fddaf5f 100644
--- a/basis/ui/gadgets/theme/switching/switching.factor
+++ b/basis/ui/gadgets/theme/switching/switching.factor
@@ -20,7 +20,7 @@ IN: ui.gadgets.theme.switching
     deprecated-style warning-background-color page-color (update-style)
     table-style line-color table-border (update-style) ;
 
-: light-theme ( -- ) light new theme set-global update-stylesheet ;
-: dark-theme ( -- ) dark new theme set-global update-stylesheet ;
+: light-mode ( -- ) light-theme theme set-global update-stylesheet ;
+: dark-mode ( -- ) dark-theme theme set-global update-stylesheet ;
 
-light-theme
+light-mode
diff --git a/basis/ui/gadgets/theme/theme.factor b/basis/ui/gadgets/theme/theme.factor
index 70d3d84eb0..2aec179052 100644
--- a/basis/ui/gadgets/theme/theme.factor
+++ b/basis/ui/gadgets/theme/theme.factor
@@ -7,10 +7,10 @@ IN: ui.gadgets.theme
     "vocab:ui/gadgets/theme/" prepend-path ".tiff" append <image-name> ;
 
 SYMBOL: theme
-TUPLE: light ;
-TUPLE: dark ;
+SINGLETON: light-theme
+SINGLETON: dark-theme
 
-light new theme set-global
+light-theme theme set-global
 
 HOOK: toolbar-background theme ( -- color )
 HOOK: toolbar-button-pressed-background theme ( -- color )