Set icon from path

This commit is contained in:
hodasemi 2024-08-29 12:37:22 +02:00
parent e0dc572580
commit 792e06abdc

View file

@ -3,6 +3,7 @@ use crate::{
prelude::*,
};
use anyhow::Result;
use assetpath::AssetPath;
use utilities::prelude::*;
use vulkan_rs::prelude::*;
@ -142,6 +143,10 @@ impl Icon {
self.iconizable_wrapper.set_icon(icon, self.visible())
}
pub fn set_icon_from_path(&self, asset_path: AssetPath) -> Result<()> {
self.iconizable_wrapper.set_icon(asset_path, self.visible())
}
pub fn set_margin(&self, margin: u32) -> Result<()> {
self.iconizable_wrapper.set_margin(margin)
}