Add support for icon themes (#23987)

This PR adds support for icon themes.

Closes https://github.com/zed-industries/zed/issues/8843.

Here is Zed with Material Icons:

<img width="1136" alt="Screenshot 2025-01-30 at 7 02 06 PM"
src="https://github.com/user-attachments/assets/57d8a0e0-ff38-44d9-8628-af58a60a7c9a"
/>

### Extensions

Extensions can provide icon themes as well as the icons used in those
themes.

Icon themes are defined as JSON files in the `icon_themes` directory,
and icons included in the `icons` directory will be packaged up with the
extension.

All icon paths within an icon theme are interpreted relative to the root
of the extension.

See the [Material Icon
Theme](https://github.com/zed-extensions/material-icon-theme) extension
for an example.

Release Notes:

- Added support for icon themes.
  - Extensions can now provide icon themes.
- Use the `icon theme selector: toggle` action to switch between
installed icon themes.
This commit is contained in:
Marshall Bowers 2025-01-30 19:08:31 -05:00 committed by GitHub
parent 7bf4fd6c46
commit 419780d702
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 1 additions and 3 deletions

View file

@ -10,6 +10,7 @@
"light": "One Light", "light": "One Light",
"dark": "One Dark" "dark": "One Dark"
}, },
"icon_theme": "Zed (Default)",
// The name of a base set of key bindings to use. // The name of a base set of key bindings to use.
// This setting can take six values, each named after another // This setting can take six values, each named after another
// text editor: // text editor:

View file

@ -319,9 +319,6 @@ pub struct ThemeSettingsContent {
#[serde(default)] #[serde(default)]
pub theme: Option<ThemeSelection>, pub theme: Option<ThemeSelection>,
/// The name of the icon theme to use. /// The name of the icon theme to use.
///
/// Currently not exposed to the user.
#[serde(skip)]
#[serde(default)] #[serde(default)]
pub icon_theme: Option<String>, pub icon_theme: Option<String>,