From 419780d7029d43c32e98887c08441dcacbd9b694 Mon Sep 17 00:00:00 2001 From: Marshall Bowers Date: Thu, 30 Jan 2025 19:08:31 -0500 Subject: [PATCH] Add support for icon themes (#23987) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR adds support for icon themes. Closes https://github.com/zed-industries/zed/issues/8843. Here is Zed with Material Icons: Screenshot 2025-01-30 at 7 02 06 PM ### 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. --- assets/settings/default.json | 1 + crates/theme/src/settings.rs | 3 --- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/assets/settings/default.json b/assets/settings/default.json index e628fafd9a..a4a30300c6 100644 --- a/assets/settings/default.json +++ b/assets/settings/default.json @@ -10,6 +10,7 @@ "light": "One Light", "dark": "One Dark" }, + "icon_theme": "Zed (Default)", // The name of a base set of key bindings to use. // This setting can take six values, each named after another // text editor: diff --git a/crates/theme/src/settings.rs b/crates/theme/src/settings.rs index e6c36bcf90..9eefc6882d 100644 --- a/crates/theme/src/settings.rs +++ b/crates/theme/src/settings.rs @@ -319,9 +319,6 @@ pub struct ThemeSettingsContent { #[serde(default)] pub theme: Option, /// The name of the icon theme to use. - /// - /// Currently not exposed to the user. - #[serde(skip)] #[serde(default)] pub icon_theme: Option,