fix(855): Windows build

`include_bytes!` needs a string literal, so it can't be used in
conjunction with `concat!` yet.
This commit is contained in:
Josh Megnauth 2025-04-27 23:11:08 -04:00
parent 7555d9dfd1
commit 4549015d5b
No known key found for this signature in database
GPG key ID: 70813183462EFAD3
2 changed files with 5 additions and 8 deletions

View file

@ -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 {

View file

@ -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)