diff --git a/crates/theme2/src/default_colors.rs b/crates/theme2/src/default_colors.rs index 3e913905f3..43d6259e52 100644 --- a/crates/theme2/src/default_colors.rs +++ b/crates/theme2/src/default_colors.rs @@ -114,27 +114,6 @@ impl Default for SystemColors { } } -impl Default for StatusColors { - fn default() -> Self { - Self { - conflict: red().dark().step_9(), - created: grass().dark().step_9(), - deleted: red().dark().step_9(), - error: red().dark().step_9(), - hidden: neutral().dark().step_9(), - hint: blue().dark().step_9(), - ignored: neutral().dark().step_9(), - info: blue().dark().step_9(), - modified: yellow().dark().step_9(), - predictive: neutral().dark_alpha().step_9(), - renamed: blue().dark().step_9(), - success: grass().dark().step_9(), - unreachable: neutral().dark().step_10(), - warning: yellow().dark().step_9(), - } - } -} - impl SyntaxTheme { pub fn default_light() -> Self { Self { diff --git a/crates/theme2/src/default_theme.rs b/crates/theme2/src/default_theme.rs index 40fb7df7cf..4e8caf67b1 100644 --- a/crates/theme2/src/default_theme.rs +++ b/crates/theme2/src/default_theme.rs @@ -13,7 +13,7 @@ fn zed_pro_daylight() -> Theme { styles: ThemeStyles { system: SystemColors::default(), colors: ThemeColors::default_light(), - status: StatusColors::default(), + status: StatusColors::light(), player: PlayerColors::default_light(), syntax: Arc::new(SyntaxTheme::default_light()), }, @@ -28,7 +28,7 @@ pub(crate) fn zed_pro_moonlight() -> Theme { styles: ThemeStyles { system: SystemColors::default(), colors: ThemeColors::default_dark(), - status: StatusColors::default(), + status: StatusColors::dark(), player: PlayerColors::default(), syntax: Arc::new(SyntaxTheme::default_dark()), }, diff --git a/crates/theme2/src/registry.rs b/crates/theme2/src/registry.rs index 0c61f6f224..a28c59b6e1 100644 --- a/crates/theme2/src/registry.rs +++ b/crates/theme2/src/registry.rs @@ -43,7 +43,7 @@ impl ThemeRegistry { }; theme_colors.refine(&user_theme.styles.colors); - let mut status_colors = StatusColors::default(); + let mut status_colors = StatusColors::dark(); status_colors.refine(&user_theme.styles.status); let mut syntax_colors = match user_theme.appearance { diff --git a/crates/theme2/src/styles.rs b/crates/theme2/src/styles.rs new file mode 100644 index 0000000000..0a44e2a468 --- /dev/null +++ b/crates/theme2/src/styles.rs @@ -0,0 +1,3 @@ +mod status; + +use status::*; diff --git a/crates/theme2/src/styles/status.rs b/crates/theme2/src/styles/status.rs new file mode 100644 index 0000000000..87f9da96ee --- /dev/null +++ b/crates/theme2/src/styles/status.rs @@ -0,0 +1,41 @@ +use crate::StatusColors; + +impl StatusColors { + pub fn dark() -> Self { + Self { + conflict: red().dark().step_9(), + created: grass().dark().step_9(), + deleted: red().dark().step_9(), + error: red().dark().step_9(), + hidden: neutral().dark().step_9(), + hint: blue().dark().step_9(), + ignored: neutral().dark().step_9(), + info: blue().dark().step_9(), + modified: yellow().dark().step_9(), + predictive: neutral().dark_alpha().step_9(), + renamed: blue().dark().step_9(), + success: grass().dark().step_9(), + unreachable: neutral().dark().step_10(), + warning: yellow().dark().step_9(), + } + } + + pub fn light() -> Self { + Self { + conflict: red().light().step_9(), + created: grass().light().step_9(), + deleted: red().light().step_9(), + error: red().light().step_9(), + hidden: neutral().light().step_9(), + hint: blue().light().step_9(), + ignored: neutral().light().step_9(), + info: blue().light().step_9(), + modified: yellow().light().step_9(), + predictive: neutral().light_alpha().step_9(), + renamed: blue().light().step_9(), + success: grass().light().step_9(), + unreachable: neutral().light().step_10(), + warning: yellow().light().step_9(), + } + } +} diff --git a/crates/theme2/src/theme2.rs b/crates/theme2/src/theme2.rs index 7e2085de4e..0d6600eca6 100644 --- a/crates/theme2/src/theme2.rs +++ b/crates/theme2/src/theme2.rs @@ -5,6 +5,7 @@ mod players; mod registry; mod scale; mod settings; +mod styles; mod syntax; #[cfg(not(feature = "importing-themes"))] mod themes; @@ -20,6 +21,7 @@ pub use players::*; pub use registry::*; pub use scale::*; pub use settings::*; +pub use styles::*; pub use syntax::*; #[cfg(not(feature = "importing-themes"))] pub use themes::*;