use crate::ui::theme::UiTheme;
pub struct IconMaster;
impl IconMaster {
pub const ICON_SETTINGS: &'static str = "\u{f101}";
pub const ICON_USER: &'static str = "\u{f102}";
pub const ICON_SEARCH: &'static str = "\u{f103}";
pub fn get_icon_size() -> f32 {
UiTheme::ICON_SIZE
}
}
pub fn load_egui_icon_from_bytes(bytes: &[u8]) -> egui::IconData {
let img = image::load_from_memory(bytes).expect("Failed to decode icon image");
let rgba = img.to_rgba8();
let (w, h) = rgba.dimensions();
egui::IconData {
rgba: rgba.into_raw(),
width: w,
height: h,
}
}