Set icon from path
This commit is contained in:
parent
e0dc572580
commit
792e06abdc
1 changed files with 5 additions and 0 deletions
|
@ -3,6 +3,7 @@ use crate::{
|
||||||
prelude::*,
|
prelude::*,
|
||||||
};
|
};
|
||||||
use anyhow::Result;
|
use anyhow::Result;
|
||||||
|
use assetpath::AssetPath;
|
||||||
use utilities::prelude::*;
|
use utilities::prelude::*;
|
||||||
use vulkan_rs::prelude::*;
|
use vulkan_rs::prelude::*;
|
||||||
|
|
||||||
|
@ -142,6 +143,10 @@ impl Icon {
|
||||||
self.iconizable_wrapper.set_icon(icon, self.visible())
|
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<()> {
|
pub fn set_margin(&self, margin: u32) -> Result<()> {
|
||||||
self.iconizable_wrapper.set_margin(margin)
|
self.iconizable_wrapper.set_margin(margin)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue