fix(header_bar): Windows build fix
This commit is contained in:
parent
7555d9dfd1
commit
46cbce033b
2 changed files with 5 additions and 8 deletions
|
|
@ -10,6 +10,7 @@ pub trait IconSourceExt {
|
||||||
fn as_cosmic_icon(&self) -> crate::widget::icon::Icon;
|
fn as_cosmic_icon(&self) -> crate::widget::icon::Icon;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(not(windows))]
|
||||||
impl IconSourceExt for fde::IconSource {
|
impl IconSourceExt for fde::IconSource {
|
||||||
fn as_cosmic_icon(&self) -> crate::widget::icon::Icon {
|
fn as_cosmic_icon(&self) -> crate::widget::icon::Icon {
|
||||||
match self {
|
match self {
|
||||||
|
|
|
||||||
|
|
@ -454,14 +454,10 @@ impl<'a, Message: Clone + 'static> HeaderBar<'a, Message> {
|
||||||
|
|
||||||
#[cfg(not(target_os = "linux"))]
|
#[cfg(not(target_os = "linux"))]
|
||||||
let icon = {
|
let icon = {
|
||||||
widget::icon::from_svg_bytes(include_bytes!(concat!(
|
widget::icon::from_path(concat!("../../res/icons/", $name, ".svg").into())
|
||||||
"../../res/icons/",
|
.symbolic(true)
|
||||||
$name,
|
.apply(widget::button::icon)
|
||||||
".svg"
|
.padding(8)
|
||||||
)))
|
|
||||||
.symbolic(true)
|
|
||||||
.apply(widget::button::icon)
|
|
||||||
.padding(8)
|
|
||||||
};
|
};
|
||||||
|
|
||||||
icon.class(crate::theme::Button::HeaderBar)
|
icon.class(crate::theme::Button::HeaderBar)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue