This commit is contained in:
Chris Cochrun 2025-06-04 11:03:24 -05:00
parent 73957b1370
commit 81c42943aa

View file

@ -214,9 +214,9 @@ impl Panel {
.clone()
.filter(|icon| !icon.ends_with("svg"))
.map(|icon| image::Handle::from_path(icon));
self.active_window_icon_svg = icon
.filter(|icon| icon.ends_with("svg"))
.map(|icon| svg::Handle::from_path(icon));
let svg = icon.map(|icon| svg::Handle::from_path(icon));
debug!(?svg);
self.active_window_icon_svg = svg;
}
_ => unreachable!(),
}
@ -349,16 +349,21 @@ impl Panel {
let workspaces = row(workspaces).spacing(20).padding([0, 5]);
let icon: Element<Message>;
if let Some(handle) = &self.active_window_icon_raster {
icon = image(handle).into();
// if let Some(handle) = &self.active_window_icon_raster {
// icon = image(handle).into();
// } else {
// if let Some(handle) = &self.active_window_icon_svg {
// icon = svg(handle.clone()).width(24).height(24).into();
// } else {
// icon = image("/home/chris/pics/wojaks/reddit_the_xenomorph_s bigass wojak folder/Chads/ChristianChad.png").into();
// }
// }
if let Some(handle) = &self.active_window_icon_svg {
icon = svg(handle.clone()).width(16).height(16).into();
} else {
if let Some(handle) = &self.active_window_icon_svg {
icon = svg(handle.clone()).width(24).height(24).into();
} else {
icon = image("/home/chris/pics/wojaks/reddit_the_xenomorph_s bigass wojak folder/Chads/ChristianChad.png").into();
}
icon = image("/home/chris/pics/wojaks/reddit_the_xenomorph_s bigass wojak folder/Chads/ChristianChad.png").into();
}
let icon = container(icon).padding(4);
let icon = container(icon).center(Length::Shrink).padding(4);
let window = text!("{}", self.active_window).color(Color::parse("#57c7ff").unwrap());
let disk = text!("{}", self.disk).color(Color::parse("#ff9f43").unwrap());