Revert "theme: Turn ThemeRegistry into a trait (#20076)" (#20094)

This PR reverts #20076 to turn the `ThemeRegistry` back into a regular
struct again.

It doesn't actually help us by having it behind a trait.

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers
2024-11-01 15:34:20 -04:00
committed by GitHub
parent 4084ba36f9
commit 273173ec8a
12 changed files with 89 additions and 151 deletions
+2 -3
View File
@@ -88,11 +88,10 @@ pub fn init(themes_to_load: LoadThemes, cx: &mut AppContext) {
LoadThemes::JustBase => (Box::new(()) as Box<dyn AssetSource>, false),
LoadThemes::All(assets) => (assets, true),
};
let registry = Arc::new(RealThemeRegistry::new(assets));
registry.clone().set_global(cx);
ThemeRegistry::set_global(assets, cx);
if load_user_themes {
registry.load_bundled_themes();
ThemeRegistry::global(cx).load_bundled_themes();
}
ThemeSettings::register(cx);