Reorganize theme2 crate
This commit is contained in:
parent
7be12cb7b1
commit
889d20d046
9 changed files with 315 additions and 304 deletions
|
@ -38,8 +38,8 @@ impl ThemeRegistry {
|
|||
fn insert_user_themes(&mut self, themes: impl IntoIterator<Item = UserTheme>) {
|
||||
self.insert_themes(themes.into_iter().map(|user_theme| {
|
||||
let mut theme_colors = match user_theme.appearance {
|
||||
Appearance::Light => ThemeColors::default_light(),
|
||||
Appearance::Dark => ThemeColors::default_dark(),
|
||||
Appearance::Light => ThemeColors::light(),
|
||||
Appearance::Dark => ThemeColors::dark(),
|
||||
};
|
||||
theme_colors.refine(&user_theme.styles.colors);
|
||||
|
||||
|
@ -47,8 +47,8 @@ impl ThemeRegistry {
|
|||
status_colors.refine(&user_theme.styles.status);
|
||||
|
||||
let mut syntax_colors = match user_theme.appearance {
|
||||
Appearance::Light => SyntaxTheme::default_light(),
|
||||
Appearance::Dark => SyntaxTheme::default_dark(),
|
||||
Appearance::Light => SyntaxTheme::light(),
|
||||
Appearance::Dark => SyntaxTheme::dark(),
|
||||
};
|
||||
if let Some(user_syntax) = user_theme.styles.syntax {
|
||||
syntax_colors.highlights = user_syntax
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue