diff --git a/src/desktop.rs b/src/desktop.rs index 34673f91..d41f29a2 100644 --- a/src/desktop.rs +++ b/src/desktop.rs @@ -10,6 +10,7 @@ pub trait IconSourceExt { fn as_cosmic_icon(&self) -> crate::widget::icon::Icon; } +#[cfg(not(windows))] impl IconSourceExt for fde::IconSource { fn as_cosmic_icon(&self) -> crate::widget::icon::Icon { match self { diff --git a/src/widget/header_bar.rs b/src/widget/header_bar.rs index 3603cc68..53c14e0b 100644 --- a/src/widget/header_bar.rs +++ b/src/widget/header_bar.rs @@ -454,14 +454,10 @@ impl<'a, Message: Clone + 'static> HeaderBar<'a, Message> { #[cfg(not(target_os = "linux"))] let icon = { - widget::icon::from_svg_bytes(include_bytes!(concat!( - "../../res/icons/", - $name, - ".svg" - ))) - .symbolic(true) - .apply(widget::button::icon) - .padding(8) + widget::icon::from_path(concat!("../../res/icons/", $name, ".svg").into()) + .symbolic(true) + .apply(widget::button::icon) + .padding(8) }; icon.class(crate::theme::Button::HeaderBar)