Work on light theme, update tab

This commit is contained in:
Nate Butler
2023-12-04 17:54:37 -05:00
parent c10d8a8110
commit 5bdaf0e074
6 changed files with 125 additions and 110 deletions
+12 -12
View File
@@ -5,7 +5,7 @@ use crate::ColorScale;
use crate::{SystemColors, ThemeColors};
pub(crate) fn neutral() -> ColorScaleSet {
slate()
sand()
}
impl ThemeColors {
@@ -29,12 +29,12 @@ impl ThemeColors {
element_disabled: neutral().light_alpha().step_3(),
drop_target_background: blue().light_alpha().step_2(),
ghost_element_background: system.transparent,
ghost_element_hover: neutral().light_alpha().step_4(),
ghost_element_active: neutral().light_alpha().step_5(),
ghost_element_hover: neutral().light_alpha().step_3(),
ghost_element_active: neutral().light_alpha().step_4(),
ghost_element_selected: neutral().light_alpha().step_5(),
ghost_element_disabled: neutral().light_alpha().step_3(),
text: yellow().light().step_9(),
text_muted: neutral().light().step_11(),
text: neutral().light().step_12(),
text_muted: neutral().light().step_10(),
text_placeholder: neutral().light().step_10(),
text_disabled: neutral().light().step_9(),
text_accent: blue().light().step_11(),
@@ -53,13 +53,13 @@ impl ThemeColors {
editor_gutter_background: neutral().light().step_1(), // todo!("pick the right colors")
editor_subheader_background: neutral().light().step_2(),
editor_active_line_background: neutral().light_alpha().step_3(),
editor_line_number: neutral().light_alpha().step_3(), // todo!("pick the right colors")
editor_active_line_number: neutral().light_alpha().step_3(), // todo!("pick the right colors")
editor_highlighted_line_background: neutral().light_alpha().step_4(), // todo!("pick the right colors")
editor_invisible: neutral().light_alpha().step_4(), // todo!("pick the right colors")
editor_wrap_guide: neutral().light_alpha().step_4(), // todo!("pick the right colors")
editor_active_wrap_guide: neutral().light_alpha().step_4(), // todo!("pick the right colors")
editor_document_highlight_read_background: neutral().light_alpha().step_4(), // todo!("pick the right colors")
editor_line_number: neutral().light().step_10(),
editor_active_line_number: neutral().light().step_11(),
editor_highlighted_line_background: neutral().light_alpha().step_3(),
editor_invisible: neutral().light().step_10(),
editor_wrap_guide: neutral().light_alpha().step_7(),
editor_active_wrap_guide: neutral().light_alpha().step_8(), // todo!("pick the right colors")
editor_document_highlight_read_background: neutral().light_alpha().step_3(), // todo!("pick the right colors")
editor_document_highlight_write_background: neutral().light_alpha().step_4(), // todo!("pick the right colors")
terminal_background: neutral().light().step_1(),
terminal_ansi_black: black().light().step_12(),
+40 -38
View File
@@ -1,47 +1,49 @@
use std::sync::Arc;
use crate::{
one_themes::{one_dark, one_family},
Theme, ThemeFamily,
Theme, ThemeFamily, Appearance, ThemeStyles, SystemColors, ThemeColors, StatusColors, PlayerColors, SyntaxTheme, default_color_scales,
};
// fn zed_pro_daylight() -> Theme {
// Theme {
// id: "zed_pro_daylight".to_string(),
// name: "Zed Pro Daylight".into(),
// appearance: Appearance::Light,
// styles: ThemeStyles {
// system: SystemColors::default(),
// colors: ThemeColors::light(),
// status: StatusColors::light(),
// player: PlayerColors::light(),
// syntax: Arc::new(SyntaxTheme::light()),
// },
// }
// }
fn zed_pro_daylight() -> Theme {
Theme {
id: "zed_pro_daylight".to_string(),
name: "Zed Pro Daylight".into(),
appearance: Appearance::Light,
styles: ThemeStyles {
system: SystemColors::default(),
colors: ThemeColors::light(),
status: StatusColors::light(),
player: PlayerColors::light(),
syntax: Arc::new(SyntaxTheme::light()),
},
}
}
// pub(crate) fn zed_pro_moonlight() -> Theme {
// Theme {
// id: "zed_pro_moonlight".to_string(),
// name: "Zed Pro Moonlight".into(),
// appearance: Appearance::Dark,
// styles: ThemeStyles {
// system: SystemColors::default(),
// colors: ThemeColors::dark(),
// status: StatusColors::dark(),
// player: PlayerColors::dark(),
// syntax: Arc::new(SyntaxTheme::dark()),
// },
// }
// }
pub(crate) fn zed_pro_moonlight() -> Theme {
Theme {
id: "zed_pro_moonlight".to_string(),
name: "Zed Pro Moonlight".into(),
appearance: Appearance::Dark,
styles: ThemeStyles {
system: SystemColors::default(),
colors: ThemeColors::dark(),
status: StatusColors::dark(),
player: PlayerColors::dark(),
syntax: Arc::new(SyntaxTheme::dark()),
},
}
}
// pub fn zed_pro_family() -> ThemeFamily {
// ThemeFamily {
// id: "zed_pro".to_string(),
// name: "Zed Pro".into(),
// author: "Zed Team".into(),
// themes: vec![zed_pro_daylight(), zed_pro_moonlight()],
// scales: default_color_scales(),
// }
// }
pub fn zed_pro_family() -> ThemeFamily {
ThemeFamily {
id: "zed_pro".to_string(),
name: "Zed Pro".into(),
author: "Zed Team".into(),
themes: vec![zed_pro_daylight(), zed_pro_moonlight()],
scales: default_color_scales(),
}
}
impl Default for ThemeFamily {
fn default() -> Self {
+2 -2
View File
@@ -7,7 +7,7 @@ use refineable::Refineable;
use crate::{
one_themes::one_family, Appearance, PlayerColors, StatusColors, SyntaxTheme, SystemColors,
Theme, ThemeColors, ThemeFamily, ThemeStyles, UserTheme, UserThemeFamily,
Theme, ThemeColors, ThemeFamily, ThemeStyles, UserTheme, UserThemeFamily, zed_pro_family,
};
pub struct ThemeRegistry {
@@ -117,7 +117,7 @@ impl Default for ThemeRegistry {
themes: HashMap::default(),
};
this.insert_theme_families([one_family()]);
this.insert_theme_families([zed_pro_family(), one_family()]);
this
}
+8 -8
View File
@@ -22,8 +22,8 @@ impl SyntaxTheme {
highlights: vec![
("attribute".into(), cyan().light().step_11().into()),
("boolean".into(), tomato().light().step_11().into()),
("comment".into(), neutral().light().step_11().into()),
("comment.doc".into(), iris().light().step_12().into()),
("comment".into(), neutral().light().step_10().into()),
("comment.doc".into(), iris().light().step_11().into()),
("constant".into(), red().light().step_9().into()),
("constructor".into(), red().light().step_9().into()),
("embedded".into(), red().light().step_9().into()),
@@ -32,11 +32,11 @@ impl SyntaxTheme {
("enum".into(), red().light().step_9().into()),
("function".into(), red().light().step_9().into()),
("hint".into(), red().light().step_9().into()),
("keyword".into(), orange().light().step_11().into()),
("keyword".into(), orange().light().step_9().into()),
("label".into(), red().light().step_9().into()),
("link_text".into(), red().light().step_9().into()),
("link_uri".into(), red().light().step_9().into()),
("number".into(), red().light().step_9().into()),
("number".into(), purple().light().step_10().into()),
("operator".into(), red().light().step_9().into()),
("predictive".into(), red().light().step_9().into()),
("preproc".into(), red().light().step_9().into()),
@@ -49,16 +49,16 @@ impl SyntaxTheme {
),
(
"punctuation.delimiter".into(),
neutral().light().step_11().into(),
neutral().light().step_10().into(),
),
(
"punctuation.list_marker".into(),
blue().light().step_11().into(),
),
("punctuation.special".into(), red().light().step_9().into()),
("string".into(), jade().light().step_11().into()),
("string".into(), jade().light().step_9().into()),
("string.escape".into(), red().light().step_9().into()),
("string.regex".into(), tomato().light().step_11().into()),
("string.regex".into(), tomato().light().step_9().into()),
("string.special".into(), red().light().step_9().into()),
(
"string.special.symbol".into(),
@@ -67,7 +67,7 @@ impl SyntaxTheme {
("tag".into(), red().light().step_9().into()),
("text.literal".into(), red().light().step_9().into()),
("title".into(), red().light().step_9().into()),
("type".into(), red().light().step_9().into()),
("type".into(), cyan().light().step_9().into()),
("variable".into(), red().light().step_9().into()),
("variable.special".into(), red().light().step_9().into()),
("variant".into(), red().light().step_9().into()),