Add icon theme selector (#23976)

This PR adds an icon theme selector for switching between icon themes:


https://github.com/user-attachments/assets/2cdc7ab7-d9f4-4968-a2e9-724e8ad4ef4d

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers 2025-01-30 16:11:42 -05:00 committed by GitHub
parent e23e03592b
commit 7adf9cb1a0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 330 additions and 6 deletions

View file

@ -212,6 +212,19 @@ impl ThemeRegistry {
self.get_icon_theme(DEFAULT_ICON_THEME_NAME)
}
/// Returns the metadata of all icon themes in the registry.
pub fn list_icon_themes(&self) -> Vec<ThemeMeta> {
self.state
.read()
.icon_themes
.values()
.map(|theme| ThemeMeta {
name: theme.name.clone(),
appearance: theme.appearance,
})
.collect()
}
/// Returns the icon theme with the specified name.
pub fn get_icon_theme(&self, name: &str) -> Result<Arc<IconTheme>> {
self.state