feat(iconsource): additional helper methods for creating handles
This commit is contained in:
parent
b3d550cc5e
commit
2b0227d34f
6 changed files with 37 additions and 9 deletions
|
|
@ -29,11 +29,9 @@ impl<Message: 'static + Clone> From<NavBarToggle<Message>> for Element<'static,
|
|||
fn from(nav_bar_toggle: NavBarToggle<Message>) -> Self {
|
||||
let mut widget = super::icon(
|
||||
if nav_bar_toggle.nav_bar_active {
|
||||
IconSource::EmbeddedSvg(iced::widget::svg::Handle::from_memory(
|
||||
&include_bytes!("../../res/sidebar-active.svg")[..],
|
||||
))
|
||||
IconSource::svg_from_memory(&include_bytes!("../../res/sidebar-active.svg")[..])
|
||||
} else {
|
||||
IconSource::Name("open-menu-symbolic".into())
|
||||
IconSource::from("open-menu-symbolic")
|
||||
},
|
||||
16,
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue