aboutsummaryrefslogtreecommitdiff
path: root/src/app.rs
diff options
context:
space:
mode:
authorUMTS at Teleco <crt@teleco.ch>2026-03-08 15:57:23 +0100
committerUMTS at Teleco <crt@teleco.ch>2026-03-08 15:57:23 +0100
commitc702ff9c873b1cdcb8796e1dd7da090f1d3e027c (patch)
tree4d569ceb470eacb796cab4f5a09a0461372b8192 /src/app.rs
parent4cc3e2bf861ba04e3924e337b9ac5d3e8d21eb02 (diff)
test
Diffstat (limited to 'src/app.rs')
-rw-r--r--src/app.rs18
1 files changed, 17 insertions, 1 deletions
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()
};