Checkpoint

This commit is contained in:
Nate Butler 2023-11-13 12:09:31 -05:00
parent 521972ed9e
commit 5361a499ae
6 changed files with 49 additions and 24 deletions

View File

@ -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 {

View File

@ -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()),
},

View File

@ -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 {

View File

@ -0,0 +1,3 @@
mod status;
use status::*;

View File

@ -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(),
}
}
}

View File

@ -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::*;