mirror of
https://github.com/zed-industries/zed.git
synced 2024-09-20 02:47:34 +03:00
Checkpoint
This commit is contained in:
parent
521972ed9e
commit
5361a499ae
@ -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 {
|
impl SyntaxTheme {
|
||||||
pub fn default_light() -> Self {
|
pub fn default_light() -> Self {
|
||||||
Self {
|
Self {
|
||||||
|
@ -13,7 +13,7 @@ fn zed_pro_daylight() -> Theme {
|
|||||||
styles: ThemeStyles {
|
styles: ThemeStyles {
|
||||||
system: SystemColors::default(),
|
system: SystemColors::default(),
|
||||||
colors: ThemeColors::default_light(),
|
colors: ThemeColors::default_light(),
|
||||||
status: StatusColors::default(),
|
status: StatusColors::light(),
|
||||||
player: PlayerColors::default_light(),
|
player: PlayerColors::default_light(),
|
||||||
syntax: Arc::new(SyntaxTheme::default_light()),
|
syntax: Arc::new(SyntaxTheme::default_light()),
|
||||||
},
|
},
|
||||||
@ -28,7 +28,7 @@ pub(crate) fn zed_pro_moonlight() -> Theme {
|
|||||||
styles: ThemeStyles {
|
styles: ThemeStyles {
|
||||||
system: SystemColors::default(),
|
system: SystemColors::default(),
|
||||||
colors: ThemeColors::default_dark(),
|
colors: ThemeColors::default_dark(),
|
||||||
status: StatusColors::default(),
|
status: StatusColors::dark(),
|
||||||
player: PlayerColors::default(),
|
player: PlayerColors::default(),
|
||||||
syntax: Arc::new(SyntaxTheme::default_dark()),
|
syntax: Arc::new(SyntaxTheme::default_dark()),
|
||||||
},
|
},
|
||||||
|
@ -43,7 +43,7 @@ impl ThemeRegistry {
|
|||||||
};
|
};
|
||||||
theme_colors.refine(&user_theme.styles.colors);
|
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);
|
status_colors.refine(&user_theme.styles.status);
|
||||||
|
|
||||||
let mut syntax_colors = match user_theme.appearance {
|
let mut syntax_colors = match user_theme.appearance {
|
||||||
|
3
crates/theme2/src/styles.rs
Normal file
3
crates/theme2/src/styles.rs
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
mod status;
|
||||||
|
|
||||||
|
use status::*;
|
41
crates/theme2/src/styles/status.rs
Normal file
41
crates/theme2/src/styles/status.rs
Normal 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(),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -5,6 +5,7 @@ mod players;
|
|||||||
mod registry;
|
mod registry;
|
||||||
mod scale;
|
mod scale;
|
||||||
mod settings;
|
mod settings;
|
||||||
|
mod styles;
|
||||||
mod syntax;
|
mod syntax;
|
||||||
#[cfg(not(feature = "importing-themes"))]
|
#[cfg(not(feature = "importing-themes"))]
|
||||||
mod themes;
|
mod themes;
|
||||||
@ -20,6 +21,7 @@ pub use players::*;
|
|||||||
pub use registry::*;
|
pub use registry::*;
|
||||||
pub use scale::*;
|
pub use scale::*;
|
||||||
pub use settings::*;
|
pub use settings::*;
|
||||||
|
pub use styles::*;
|
||||||
pub use syntax::*;
|
pub use syntax::*;
|
||||||
#[cfg(not(feature = "importing-themes"))]
|
#[cfg(not(feature = "importing-themes"))]
|
||||||
pub use themes::*;
|
pub use themes::*;
|
||||||
|
Loading…
Reference in New Issue
Block a user