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