From c702ff9c873b1cdcb8796e1dd7da090f1d3e027c Mon Sep 17 00:00:00 2001 From: UMTS at Teleco Date: Sun, 8 Mar 2026 15:57:23 +0100 Subject: test --- src/app.rs | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/app.rs b/src/app.rs index 4f3aefb..55c75df 100644 --- a/src/app.rs +++ b/src/app.rs @@ -1028,6 +1028,21 @@ fn find_hoardom() -> PathBuf { PathBuf::from("hoardom") } +// ----- load app icon ----- + +fn load_icon() -> egui::IconData { + let png_bytes = include_bytes!("../dist/AppIcon.png"); + let img = image::load_from_memory_with_format(png_bytes, image::ImageFormat::Png) + .expect("failed to decode embedded icon") + .into_rgba8(); + let (w, h) = img.dimensions(); + egui::IconData { + rgba: img.into_raw(), + width: w, + height: h, + } +} + // ----- main ----- fn main() -> eframe::Result<()> { @@ -1124,7 +1139,8 @@ fn main() -> eframe::Result<()> { viewport: egui::ViewportBuilder::default() .with_title("hoardom") .with_inner_size([est_width, est_height]) - .with_min_inner_size([300.0, 200.0]), + .with_min_inner_size([300.0, 200.0]) + .with_icon(load_icon()), ..Default::default() }; -- cgit v1.2.3-70-g09d2