From 81c42943aa0c83d32d5bd0ad23fb2aab183203ca Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Wed, 4 Jun 2025 11:03:24 -0500 Subject: [PATCH] idk --- src/main.rs | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/src/main.rs b/src/main.rs index 1032ae6..802f46d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -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; - 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());