Remove old Theme
definition (#3195)
This PR removes the old `Theme` definition in favor of the new
`ThemeVariant`s.
The new `SyntaxStyles` have been reverted to the old `SyntaxTheme` that
operates by storing the syntax styles as a vector of
`gpui2::HighlightStyle`s.
This is necessary for the intended usage by `language2`, where we find
the longest key in the theme's syntax styles that matches the capture
name:
18431051d9/crates/language2/src/highlight_map.rs (L15-L41)
This commit is contained in:
parent
18431051d9
commit
36a73d657a
54 changed files with 173 additions and 6832 deletions
|
@ -48,7 +48,7 @@ fn main() {
|
|||
let args = Args::parse();
|
||||
|
||||
let story_selector = args.story.clone();
|
||||
let theme_name = args.theme.unwrap_or("One Dark".to_string());
|
||||
let theme_name = args.theme.unwrap_or("Zed Pro Moonlight".to_string());
|
||||
|
||||
let asset_source = Arc::new(Assets);
|
||||
gpui2::App::production(asset_source).run(move |cx| {
|
||||
|
@ -68,7 +68,7 @@ fn main() {
|
|||
let theme_registry = cx.global::<ThemeRegistry>();
|
||||
|
||||
let mut theme_settings = ThemeSettings::get_global(cx).clone();
|
||||
theme_settings.old_active_theme = theme_registry.get(&theme_name).unwrap();
|
||||
theme_settings.active_theme = theme_registry.get(&theme_name).unwrap();
|
||||
ThemeSettings::override_global(theme_settings, cx);
|
||||
|
||||
ui::settings::init(cx);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue