update
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
use anyhow::Context;
|
||||
use gpui::{App, AssetSource, Result, SharedString};
|
||||
use gpui_component::IconNamed;
|
||||
use rust_embed::RustEmbed;
|
||||
|
||||
#[derive(RustEmbed)]
|
||||
@@ -45,3 +46,20 @@ impl Assets {
|
||||
cx.text_system().add_fonts(embedded_fonts)
|
||||
}
|
||||
}
|
||||
|
||||
pub enum CustomIconName {
|
||||
Filter,
|
||||
GlobalOn,
|
||||
GlobalOff,
|
||||
}
|
||||
|
||||
impl IconNamed for CustomIconName {
|
||||
fn path(self) -> gpui::SharedString {
|
||||
match self {
|
||||
CustomIconName::Filter => "icons/filter.svg",
|
||||
CustomIconName::GlobalOn => "icons/global-on.svg",
|
||||
CustomIconName::GlobalOff => "icons/global-off.svg",
|
||||
}
|
||||
.into()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user