Use macOS-margin runtime app icon on macOS (#128)

This commit is contained in:
cyfung1031
2026-10-10 12:16:55 -04:00
committed by GitHub
parent 8fe9baddb5
commit 083a3f095d
+6 -2
View File
@@ -83,9 +83,13 @@ fn services() -> Services {
const APP_ID: &str = "ai.storyteller.cadcraft";
#[cfg(target_os = "macos")]
const APP_ICON_PNG: &[u8] = include_bytes!("../../../assets/app-icon/cadcraft-macos-512.png");
#[cfg(not(target_os = "macos"))]
const APP_ICON_PNG: &[u8] = include_bytes!("../../../assets/app-icon/cadcraft-256.png");
fn app_icon() -> Option<egui::IconData> {
let png: &[u8] = include_bytes!("../../../assets/app-icon/cadcraft-256.png");
eframe::icon_data::from_png_bytes(png).map_err(|e| log::warn!("app icon: {e}")).ok()
eframe::icon_data::from_png_bytes(APP_ICON_PNG).map_err(|e| log::warn!("app icon: {e}")).ok()
}
fn version_string() -> String {