macOS: use the padded app icon in the Dock

This commit is contained in:
Zarvinx 2026-10-11 01:20:03 +03:00
parent 90b3c41eec
commit 706fe7b10c
1 changed files with 3 additions and 0 deletions

View File

@ -165,6 +165,9 @@ fn services() -> Services {
}
fn icon() -> Option<egui::IconData> {
#[cfg(target_os = "macos")]
let bytes = include_bytes!("../../../assets/app-icon/gridcraft-macos-512.png");
#[cfg(not(target_os = "macos"))]
let bytes = include_bytes!("../../../assets/app-icon/hicolor/256x256/apps/ai.storyteller.gridcraft.png");
let img = image::load_from_memory(bytes).ok()?.to_rgba8();
Some(egui::IconData { width: img.width(), height: img.height(), rgba: img.into_raw() })