Add infrastructure for loading icon themes from extensions (#23203)
This PR adds the supporting infrastructure to support loading icon themes defined by extensions. Here's an example icon theme: ```json { "name": "My Icon Theme", "author": "Me <me@example.com>", "themes": [ { "name": "My Icon Theme", "appearance": "dark", "file_icons": { "gleam": { "path": "./icons/file_type_gleam.svg" }, "toml": { "path": "./icons/file_type_toml.svg" } } } ] } ``` The icon paths are resolved relative to the root of the extension directory. Release Notes: - N/A
This commit is contained in:
parent
3b8a5c9647
commit
f53915c711
11 changed files with 303 additions and 10 deletions
|
@ -149,6 +149,7 @@ async fn test_extension_store(cx: &mut TestAppContext) {
|
|||
authors: Vec::new(),
|
||||
repository: None,
|
||||
themes: Default::default(),
|
||||
icon_themes: Vec::new(),
|
||||
lib: Default::default(),
|
||||
languages: vec!["languages/erb".into(), "languages/ruby".into()],
|
||||
grammars: [
|
||||
|
@ -181,6 +182,7 @@ async fn test_extension_store(cx: &mut TestAppContext) {
|
|||
"themes/monokai-pro.json".into(),
|
||||
"themes/monokai.json".into(),
|
||||
],
|
||||
icon_themes: Vec::new(),
|
||||
lib: Default::default(),
|
||||
languages: Default::default(),
|
||||
grammars: BTreeMap::default(),
|
||||
|
@ -258,6 +260,7 @@ async fn test_extension_store(cx: &mut TestAppContext) {
|
|||
]
|
||||
.into_iter()
|
||||
.collect(),
|
||||
icon_themes: BTreeMap::default(),
|
||||
};
|
||||
|
||||
let proxy = Arc::new(ExtensionHostProxy::new());
|
||||
|
@ -344,6 +347,7 @@ async fn test_extension_store(cx: &mut TestAppContext) {
|
|||
authors: vec![],
|
||||
repository: None,
|
||||
themes: vec!["themes/gruvbox.json".into()],
|
||||
icon_themes: Vec::new(),
|
||||
lib: Default::default(),
|
||||
languages: Default::default(),
|
||||
grammars: BTreeMap::default(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue