diff --git a/apps/figcraft/src/services.rs b/apps/figcraft/src/services.rs index ea1658d..8d0c1f5 100644 --- a/apps/figcraft/src/services.rs +++ b/apps/figcraft/src/services.rs @@ -210,7 +210,7 @@ impl Services for Desktop { /// The window icon from the bundled app icon (if present). pub fn window_icon() -> Option { - // macOS wants Apple's padded grid; the other platforms the tile edge to edge. + // macOS wants Apple's padded grid; the other platforms the rounded tile edge to edge. #[cfg(target_os = "macos")] let bytes = include_bytes!("../../../assets/app-icon/figcraft-256.png"); #[cfg(not(target_os = "macos"))] diff --git a/assets/app-icon/README.md b/assets/app-icon/README.md index cf00fec..435dc68 100644 --- a/assets/app-icon/README.md +++ b/assets/app-icon/README.md @@ -16,8 +16,8 @@ Exactly three colours: ## Geometry A 512-unit tile (`viewBox="0 0 512 512"`), rounded square with `rx=112`, no border. The macOS -renders pad it onto Apple's 824/1024 icon grid; the Windows and Linux renders crop 22 units off -each side so the figure reads at 16–48 px. +renders pad it onto Apple's 824/1024 icon grid; Windows and Linux use the tile edge to edge, with +its rounded corners, like the other Crafting Apps. ## Provenance diff --git a/assets/app-icon/figcraft.ico b/assets/app-icon/figcraft.ico index 29ca546..c170c6e 100644 Binary files a/assets/app-icon/figcraft.ico and b/assets/app-icon/figcraft.ico differ diff --git a/assets/app-icon/hicolor/128x128/apps/ai.storyteller.figcraft.png b/assets/app-icon/hicolor/128x128/apps/ai.storyteller.figcraft.png index b71cddf..48be0b9 100644 Binary files a/assets/app-icon/hicolor/128x128/apps/ai.storyteller.figcraft.png and b/assets/app-icon/hicolor/128x128/apps/ai.storyteller.figcraft.png differ diff --git a/assets/app-icon/hicolor/16x16/apps/ai.storyteller.figcraft.png b/assets/app-icon/hicolor/16x16/apps/ai.storyteller.figcraft.png index 7607ae0..60012d3 100644 Binary files a/assets/app-icon/hicolor/16x16/apps/ai.storyteller.figcraft.png and b/assets/app-icon/hicolor/16x16/apps/ai.storyteller.figcraft.png differ diff --git a/assets/app-icon/hicolor/256x256/apps/ai.storyteller.figcraft.png b/assets/app-icon/hicolor/256x256/apps/ai.storyteller.figcraft.png index e0115f0..6717436 100644 Binary files a/assets/app-icon/hicolor/256x256/apps/ai.storyteller.figcraft.png and b/assets/app-icon/hicolor/256x256/apps/ai.storyteller.figcraft.png differ diff --git a/assets/app-icon/hicolor/32x32/apps/ai.storyteller.figcraft.png b/assets/app-icon/hicolor/32x32/apps/ai.storyteller.figcraft.png index 0393dfe..a677809 100644 Binary files a/assets/app-icon/hicolor/32x32/apps/ai.storyteller.figcraft.png and b/assets/app-icon/hicolor/32x32/apps/ai.storyteller.figcraft.png differ diff --git a/assets/app-icon/hicolor/48x48/apps/ai.storyteller.figcraft.png b/assets/app-icon/hicolor/48x48/apps/ai.storyteller.figcraft.png index 99017e6..2668739 100644 Binary files a/assets/app-icon/hicolor/48x48/apps/ai.storyteller.figcraft.png and b/assets/app-icon/hicolor/48x48/apps/ai.storyteller.figcraft.png differ diff --git a/assets/app-icon/hicolor/512x512/apps/ai.storyteller.figcraft.png b/assets/app-icon/hicolor/512x512/apps/ai.storyteller.figcraft.png index 20e6045..6059cfd 100644 Binary files a/assets/app-icon/hicolor/512x512/apps/ai.storyteller.figcraft.png and b/assets/app-icon/hicolor/512x512/apps/ai.storyteller.figcraft.png differ diff --git a/assets/app-icon/hicolor/64x64/apps/ai.storyteller.figcraft.png b/assets/app-icon/hicolor/64x64/apps/ai.storyteller.figcraft.png index 96f63c8..c3e7972 100644 Binary files a/assets/app-icon/hicolor/64x64/apps/ai.storyteller.figcraft.png and b/assets/app-icon/hicolor/64x64/apps/ai.storyteller.figcraft.png differ diff --git a/xtask/src/icon.rs b/xtask/src/icon.rs index d189d79..b91fcce 100644 --- a/xtask/src/icon.rs +++ b/xtask/src/icon.rs @@ -9,8 +9,6 @@ use std::process::Command; const VIEW_BOX: &str = r#"viewBox="0 0 512 512""#; /// macOS: the 512-unit tile padded onto Apple's 824/1024 icon grid (transparent margin). const MAC_VIEW_BOX: &str = r#"viewBox="-62 -62 636 636""#; -/// Windows and Linux: 22 units cropped off each side so the portrait reads at 16-48 px. -const TIGHT_VIEW_BOX: &str = r#"viewBox="22 22 468 468""#; fn render(svg: &Path, size: u32, out: &Path) -> bool { let s = size.to_string(); @@ -32,10 +30,9 @@ pub fn generate(root: &Path) -> bool { return false; } let tmp = root.join("target/icon"); - let (mac, tight) = (tmp.join("mac.svg"), tmp.join("tight.svg")); - let mut ok = std::fs::create_dir_all(&tmp).is_ok() - && std::fs::write(&mac, master.replacen(VIEW_BOX, MAC_VIEW_BOX, 1)).is_ok() - && std::fs::write(&tight, master.replacen(VIEW_BOX, TIGHT_VIEW_BOX, 1)).is_ok(); + // Windows and Linux show the tile edge to edge, rounded corners and all: the master as it is. + let (mac, tile) = (tmp.join("mac.svg"), dir.join("figcraft.svg")); + let mut ok = std::fs::create_dir_all(&tmp).is_ok() && std::fs::write(&mac, master.replacen(VIEW_BOX, MAC_VIEW_BOX, 1)).is_ok(); if !ok { eprintln!("icon: cannot write {}", tmp.display()); return false; @@ -45,7 +42,7 @@ pub fn generate(root: &Path) -> bool { if size <= 512 { let hd = dir.join(format!("hicolor/{size}x{size}/apps")); let _ = std::fs::create_dir_all(&hd); - ok &= render(&tight, size, &hd.join("ai.storyteller.figcraft.png")); + ok &= render(&tile, size, &hd.join("ai.storyteller.figcraft.png")); } } // Windows .ico (PNG-compressed entries). @@ -54,7 +51,7 @@ pub fn generate(root: &Path) -> bool { .iter() .filter_map(|s| { let png = tmp.join(format!("ico-{s}.png")); - render(&tight, *s, &png).then(|| std::fs::read(png).ok()).flatten() + render(&tile, *s, &png).then(|| std::fs::read(png).ok()).flatten() }) .collect(); ok &= pngs.len() == sizes.len();