use crate::{api::prelude::*, proc_macros::*, themes::theme_orbtk::*};
widget!(
FontIconBlock {
icon: String,
icon_brush: Brush,
icon_size: f64,
icon_font: String
}
);
impl Template for FontIconBlock {
fn template(self, _: Entity, _: &mut BuildContext) -> Self {
self.name("FontIconBlock")
.style("font-icon-block")
.icon("")
.icon_brush(colors::LINK_WATER_COLOR)
.icon_size(orbtk_fonts::ICON_FONT_SIZE_12)
.icon_font("MaterialIcons-Regular")
}
fn render_object(&self) -> Box<dyn RenderObject> {
FontIconRenderObject.into()
}
fn layout(&self) -> Box<dyn Layout> {
FixedSizeLayout::new().into()
}
}