app icon: nine-tailed kitsune (owner's ArtCraft drawing), Dock/taskbar/launcher wiring, palette docs

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Brandon ThomasandClaude Opus 5.5 committed 2026-10-02 09:47:45 -04:00
1 parent 1fc68c7411
commit 148b1b4411
19 files changed
+85 -77

No files matched your search

+17 -1
View File
@@ -16,6 +16,19 @@ mod services;
use photocraft_engine::Session;
use photocraft_ui_egui::PhotocraftApp;
/// Matches the `.desktop` file and hicolor icon name, so Wayland docks pick up the icon.
const APP_ID: &str = "ai.storyteller.photocraft";
/// Window, taskbar and (when running unbundled) Dock icon. macOS gets the padded 1024 px render
/// on Apple's icon grid; elsewhere the tighter 256 px hicolor render reads better at small sizes.
fn app_icon() -> egui::IconData {
#[cfg(target_os = "macos")]
const PNG: &[u8] = include_bytes!("../../../assets/app-icon/photocraft-1024.png");
#[cfg(not(target_os = "macos"))]
const PNG: &[u8] = include_bytes!("../../../assets/app-icon/hicolor/256x256/apps/ai.storyteller.photocraft.png");
eframe::icon_data::from_png_bytes(PNG).unwrap_or_default()
}
fn main() -> eframe::Result {
let mut control_port: Option<u16> = std::env::var("PHOTOCRAFT_CONTROL_PORT").ok().and_then(|p| p.parse().ok());
let mut files = Vec::new();
@@ -34,7 +47,10 @@ fn main() -> eframe::Result {
}
let options = eframe::NativeOptions {
viewport: egui::ViewportBuilder::default().with_title("PhotoCraft").with_inner_size([1440.0, 900.0]).with_min_inner_size([760.0, 480.0]).with_drag_and_drop(true).with_fullsize_content_view(true).with_titlebar_shown(false).with_title_shown(false),
viewport: egui::ViewportBuilder::default()
.with_icon(app_icon())
.with_app_id(APP_ID)
.with_title("PhotoCraft").with_inner_size([1440.0, 900.0]).with_min_inner_size([760.0, 480.0]).with_drag_and_drop(true).with_fullsize_content_view(true).with_titlebar_shown(false).with_title_shown(false),
..Default::default()
};
eframe::run_native(
+5 -4
View File
@@ -1,8 +1,9 @@
Photocraft app icon (photocraft.svg and every file derived from it in this directory:
photocraft-1024.png, photocraft.icns, photocraft.ico, hicolor/).
PhotoCraft app icon (photocraft.svg, photocraft-small.svg and every file derived from them in
this directory: photocraft-1024.png, photocraft.icns, photocraft.ico, hicolor/).
Original artwork by the Photocraft authors, made for this project (no third-party material).
Licensed like the rest of Photocraft, under either of
Original artwork made for this project by the project owner: an engraving-style drawing created
in ArtCraft, then vectorised. No third-party material. Licensed like the rest of PhotoCraft,
under either of
* Apache License, Version 2.0 (https://www.apache.org/licenses/LICENSE-2.0)
* MIT license (https://opensource.org/licenses/MIT)
+44
View File
@@ -0,0 +1,44 @@
# PhotoCraft app icon
A **nine-tailed kitsune with a brow diamond**: an engraving portrait, seated, looking back at the
viewer, in the Crafting Apps' owl-template framing (full-bleed field, head and body filling the
tile, tails running off the edges).
## Palette
Exactly three colours:
| Colour | Hex | Used for |
|---|---|---|
| Ink | `#0b0b0c` | line work and contours |
| Paper | `#efe9dc` | the figure |
| PhotoCraft blue (app colour) | `#2f7bf5` | the full-bleed field |
## 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.
## Provenance
The owner's original drawing, made in ArtCraft (2880 px, engraving style, keyed to the palette),
vectorised with craftrules `assets/logo-options/_tools/vectorize_tile.py`. The source PNG stays in
craftrules at `assets/app-icons/photocraft/source.png`. License: see `LICENSE.txt`.
## Files
- `photocraft.svg`: canonical master (traced at 2048 px).
- `photocraft-small.svg`: lighter trace (traced at 1024 px); also the hicolor scalable icon.
- `photocraft-1024.png`: 1024 px render on the macOS grid.
- `photocraft.icns`: macOS bundle icon (`CFBundleIconFile`).
- `photocraft.ico`: Windows icon, 16–256 px, embedded in the `.exe` by `apps/photocraft/build.rs`.
- `hicolor/<size>/apps/ai.storyteller.photocraft.png` (16–512) and `hicolor/scalable/...svg`:
Linux icon theme.
The app also sets the window icon and Wayland app ID at runtime (`apps/photocraft/src/main.rs`).
## Regenerate
Replace `photocraft.svg` (and `photocraft-small.svg`), then run `packaging/icons.sh`. It needs
`resvg`, plus `iconutil` on macOS; the `.ico` is packed by `cargo xtask ico`.
Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.4 KiB

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 671 B

After

Width:  |  Height:  |  Size: 784 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 168 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 6.2 KiB

@@ -1,31 +1 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Photocraft app icon. Original design by the Photocraft authors. MIT OR Apache-2.0. -->
<svg xmlns="http://www.w3.org/2000/svg" width="1024" height="1024" viewBox="0 0 1024 1024">
<defs>
<linearGradient id="bg" x1="0" y1="0" x2="0" y2="1">
<stop offset="0" stop-color="#3A3A3D"/>
<stop offset="1" stop-color="#1C1C1E"/>
</linearGradient>
<radialGradient id="lens" cx="0.42" cy="0.38" r="0.7">
<stop offset="0" stop-color="#9FD0FF"/>
<stop offset="1" stop-color="#2A78D6"/>
</radialGradient>
<clipPath id="disc"><circle cx="512" cy="512" r="300"/></clipPath>
</defs>
<!-- Body: Apple's 824/1024 grid, so the icon sits correctly in the macOS Dock. -->
<rect x="100" y="100" width="824" height="824" rx="185" fill="url(#bg)"/>
<rect x="100.5" y="100.5" width="823" height="823" rx="184.5" fill="none" stroke="#FFFFFF" stroke-opacity="0.08"/>
<!-- Aperture: six blades around a hexagonal opening. -->
<circle cx="512" cy="512" r="318" fill="#141416"/>
<g clip-path="url(#disc)" stroke="#141416" stroke-width="12" stroke-linejoin="round">
<path d="M409.8,453.0 L216.6,564.5 A300,300 0 0 0 409.8,794.1 L409.8,571.0 Z" fill="#5AA6FF"/>
<path d="M409.8,571.0 L409.8,794.1 A300,300 0 0 0 705.2,741.5 L512.0,630.0 Z" fill="#378EF0"/>
<path d="M512.0,630.0 L705.2,741.5 A300,300 0 0 0 807.4,459.5 L614.2,571.0 Z" fill="#2A78D6"/>
<path d="M614.2,571.0 L807.4,459.5 A300,300 0 0 0 614.2,229.9 L614.2,453.0 Z" fill="#1F64BA"/>
<path d="M614.2,453.0 L614.2,229.9 A300,300 0 0 0 318.8,282.5 L512.0,394.0 Z" fill="#2A78D6"/>
<path d="M512.0,394.0 L318.8,282.5 A300,300 0 0 0 216.6,564.5 L409.8,453.0 Z" fill="#378EF0"/>
<path d="M512.0,394.0 L614.2,453.0 L614.2,571.0 L512.0,630.0 L409.8,571.0 L409.8,453.0 Z" fill="url(#lens)" stroke="none"/>
</g>
<!-- A highlight glint in the opening. -->
<ellipse cx="478" cy="468" rx="34" ry="20" transform="rotate(-30 478 468)" fill="#FFFFFF" fill-opacity="0.55"/>
</svg>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><defs><clipPath id="t"><rect width="512" height="512" rx="112"/></clipPath></defs><g clip-path="url(#t)"><rect width="512" height="512" fill="#2f7bf5"/><path fill="#efe9dc" fill-rule="evenodd" d="M107 492C107 492 106 491 106 490C106 489 104 487 103 487C102 487 102 486 102 486C102 485 101 486 100 487C99 488 98 488 98 485C98 483 95 483 93 486C92 488 91 488 91 486C90 483 86 482 84 484C83 486 80 485 79 483C77 480 78 473 80 469C81 466 82 465 85 464C85 464 86 464 86 463C86 459 93 451 97 449C102 447 105 446 105 444C105 442 105 421 104 421C104 420 104 418 104 415C103 409 101 396 100 393C96 379 95 374 92 362C90 354 89 347 88 345C88 344 88 341 88 340C88 334 86 335 86 341C85 346 85 345 84 340C83 336 83 336 82 337C80 338 80 338 80 334C81 330 80 328 78 330C77 331 77 331 77 326C76 322 76 321 75 323C73 325 73 324 73 320C74 315 72 312 71 318C71 321 70 320 69 316C68 313 68 313 67 316C66 320 63 315 63 308C63 305 62 304 62 306C61 307 60 307 61 305C61 303 58 296 58 296C57 296 57 297 56 298C55 301 55 301 54 295C53 293 53 290 53 289C53 288 52 288 52 288C52 289 50 291 49 291C49 290 50 288 51 285C52 281 52 280 51 278L51 276 50 278C49 279 48 280 48 281C48 282 48 282 48 282C47 282 47 281 47 274C47 270 47 266 46 266C46 266 46 267 46 268C46 269 46 269 46 269C45 269 45 269 45 269C43 270 43 268 44 265C46 261 46 260 44 259C43 259 43 254 44 249C45 246 45 246 43 248C42 249 41 250 40 250C40 249 44 240 46 236C48 232 48 232 45 234C43 237 41 237 43 235C44 234 46 228 46 227C45 227 44 228 43 229C42 231 40 231 42 229C45 225 46 221 43 223C40 226 41 224 45 217C50 209 50 206 45 211C44 212 43 212 43 212C42 212 46 206 48 204C49 203 49 202 49 202C49 201 49 201 50 201C50 201 51 201 51 201C51 200 50 200 48 201C44 201 44 201 46 198C48 196 51 190 51 188C51 188 52 187 52 186C54 185 53 185 49 186C44 188 44 188 47 185C48 183 48 183 48 182C47 181 48 181 51 177C55 174 56 173 55 172C55 171 55 170 56 170C58 168 59 166 58 165C58 164 59 164 56 165C54 165 53 165 54 164C56 163 52 163 50 163C49 164 48 164 48 164C48 163 52 159 53 159C53 159 53 159 53 158C53 157 53 157 55 156C59 154 63 149 60 150C59 150 59 150 59 150C59 149 60 148 61 147C64 145 64 143 61 145C59 146 59 146 60 144C61 143 61 142 60 142C59 141 59 141 61 139C62 138 63 137 64 136C64 135 65 134 67 132C70 129 70 128 65 130C62 131 65 128 68 126C71 125 71 124 69 123C68 122 68 122 70 122C71 122 72 121 72 120C72 120 73 119 73 118L74 117 73 117C72 116 75 113 77 113C79 113 79 113 78 111C77 109 77 109 78 109C79 109 79 108 79 105C79 104 78 101 78 100C78 98 78 96 78 94C77 92 77 91 78 91C79 90 79 89 79 87C80 76 81 71 81 69C82 67 83 65 83 64C83 62 83 61 84 60C84 60 85 58 85 56C85 55 86 53 86 52C86 52 87 50 87 49C88 44 88 43 89 41C90 40 91 38 92 36C96 28 100 28 109 40C110 41 111 42 112 43C112 45 117 51 122 58C123 59 124 60 125 60C126 60 127 61 127 62C129 65 129 66 131 66C132 66 132 67 133 68C133 70 134 70 134 70C136 71 136 72 138 75C139 76 139 76 141 76C142 76 143 77 144 77C145 78 146 78 147 77C148 76 149 76 149 77C150 78 150 78 153 75C155 73 156 72 157 72C158 72 158 72 159 71C160 69 164 65 166 65C166 65 166 65 166 64C166 63 174 58 175 59C175 59 175 59 177 58C178 57 179 56 179 56C179 56 181 55 184 52C190 46 193 44 197 42C199 41 201 40 202 39C204 37 205 36 206 36C207 35 209 34 209 34C211 33 212 33 214 33C215 33 217 32 217 32C218 31 221 32 222 34C223 37 222 47 220 49C220 49 219 51 219 52C218 54 217 57 217 59C216 61 215 64 215 65C214 66 214 68 213 69C212 70 212 72 212 73C211 74 211 77 210 79C209 81 209 82 209 83C210 84 210 84 208 87C208 88 207 91 207 93C207 95 206 97 205 98C204 100 204 101 204 101C204 102 200 110 199 112C196 118 196 117 197 118C198 118 198 120 199 121C199 122 199 124 200 124C201 125 201 126 201 128C201 129 201 130 202 130C202 130 202 131 202 132C202 134 202 135 203 135C204 136 204 136 202 139C201 141 201 142 201 144C201 144 201 146 201 148C200 149 200 152 200 154C199 156 199 159 198 159C198 160 197 162 197 163C197 164 196 166 195 167C194 168 193 169 193 170C193 170 193 171 192 171C187 175 187 179 190 186C194 194 194 197 190 200C186 204 188 209 195 211C200 212 201 212 200 213C200 215 201 215 205 217L208 219 207 220C205 221 205 222 207 223C207 223 208 224 208 224C208 224 209 225 209 226C211 228 212 230 212 233C213 236 217 238 218 236C222 228 222 211 218 205C218 204 217 203 217 202C216 200 215 198 214 197C213 197 212 195 212 194C210 191 204 187 198 185C196 185 198 183 204 181C210 180 215 180 220 181C222 182 224 182 225 183C225 183 227 183 228 183C234 186 235 185 232 180C231 179 229 177 229 176C229 175 228 173 227 171C225 166 224 162 226 164C227 165 227 164 226 160C226 159 226 156 226 155C226 154 226 151 225 148C225 144 225 140 226 140C226 140 226 140 226 141C226 141 226 142 226 142C227 142 227 140 227 139C227 133 229 123 231 121C231 121 232 119 233 118C234 114 235 112 236 112C237 112 237 111 238 109C239 107 241 104 241 103C242 102 244 99 246 97C248 94 250 92 252 92C253 91 255 90 256 89C259 86 268 80 272 79C282 75 294 60 291 54C291 54 291 53 291 51C29Line truncated

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 321 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 73 KiB

After

Width:  |  Height:  |  Size: 298 KiB

+1
View File
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><defs><clipPath id="t"><rect width="512" height="512" rx="112"/></clipPath></defs><g clip-path="url(#t)"><rect width="512" height="512" fill="#2f7bf5"/><path fill="#efe9dc" fill-rule="evenodd" d="M107 492C107 492 106 491 106 490C106 489 104 487 103 487C102 487 102 486 102 486C102 485 101 486 100 487C99 488 98 488 98 485C98 483 95 483 93 486C92 488 91 488 91 486C90 483 86 482 84 484C83 486 80 485 79 483C77 480 78 473 80 469C81 466 82 465 85 464C85 464 86 464 86 463C86 459 93 451 97 449C102 447 105 446 105 444C105 442 105 421 104 421C104 420 104 418 104 415C103 409 101 396 100 393C96 379 95 374 92 362C90 354 89 347 88 345C88 344 88 341 88 340C88 334 86 335 86 341C85 346 85 345 84 340C83 336 83 336 82 337C80 338 80 338 80 334C81 330 80 328 78 330C77 331 77 331 77 326C76 322 76 321 75 323C73 325 73 324 73 320C74 315 72 312 71 318C71 321 70 320 69 316C68 313 68 313 67 316C66 320 63 315 63 308C63 305 62 304 62 306C61 307 60 307 61 305C61 303 58 296 58 296C57 296 57 297 56 298C55 301 55 301 54 295C53 293 53 290 53 289C53 288 52 288 52 288C52 289 50 291 49 291C49 290 50 288 51 285C52 281 52 280 51 278L51 276 50 278C49 279 48 280 48 281C48 282 48 282 48 282C47 282 47 281 47 274C47 270 47 266 46 266C46 266 46 267 46 268C46 269 46 269 46 269C45 269 45 269 45 269C43 270 43 268 44 265C46 261 46 260 44 259C43 259 43 254 44 249C45 246 45 246 43 248C42 249 41 250 40 250C40 249 44 240 46 236C48 232 48 232 45 234C43 237 41 237 43 235C44 234 46 228 46 227C45 227 44 228 43 229C42 231 40 231 42 229C45 225 46 221 43 223C40 226 41 224 45 217C50 209 50 206 45 211C44 212 43 212 43 212C42 212 46 206 48 204C49 203 49 202 49 202C49 201 49 201 50 201C50 201 51 201 51 201C51 200 50 200 48 201C44 201 44 201 46 198C48 196 51 190 51 188C51 188 52 187 52 186C54 185 53 185 49 186C44 188 44 188 47 185C48 183 48 183 48 182C47 181 48 181 51 177C55 174 56 173 55 172C55 171 55 170 56 170C58 168 59 166 58 165C58 164 59 164 56 165C54 165 53 165 54 164C56 163 52 163 50 163C49 164 48 164 48 164C48 163 52 159 53 159C53 159 53 159 53 158C53 157 53 157 55 156C59 154 63 149 60 150C59 150 59 150 59 150C59 149 60 148 61 147C64 145 64 143 61 145C59 146 59 146 60 144C61 143 61 142 60 142C59 141 59 141 61 139C62 138 63 137 64 136C64 135 65 134 67 132C70 129 70 128 65 130C62 131 65 128 68 126C71 125 71 124 69 123C68 122 68 122 70 122C71 122 72 121 72 120C72 120 73 119 73 118L74 117 73 117C72 116 75 113 77 113C79 113 79 113 78 111C77 109 77 109 78 109C79 109 79 108 79 105C79 104 78 101 78 100C78 98 78 96 78 94C77 92 77 91 78 91C79 90 79 89 79 87C80 76 81 71 81 69C82 67 83 65 83 64C83 62 83 61 84 60C84 60 85 58 85 56C85 55 86 53 86 52C86 52 87 50 87 49C88 44 88 43 89 41C90 40 91 38 92 36C96 28 100 28 109 40C110 41 111 42 112 43C112 45 117 51 122 58C123 59 124 60 125 60C126 60 127 61 127 62C129 65 129 66 131 66C132 66 132 67 133 68C133 70 134 70 134 70C136 71 136 72 138 75C139 76 139 76 141 76C142 76 143 77 144 77C145 78 146 78 147 77C148 76 149 76 149 77C150 78 150 78 153 75C155 73 156 72 157 72C158 72 158 72 159 71C160 69 164 65 166 65C166 65 166 65 166 64C166 63 174 58 175 59C175 59 175 59 177 58C178 57 179 56 179 56C179 56 181 55 184 52C190 46 193 44 197 42C199 41 201 40 202 39C204 37 205 36 206 36C207 35 209 34 209 34C211 33 212 33 214 33C215 33 217 32 217 32C218 31 221 32 222 34C223 37 222 47 220 49C220 49 219 51 219 52C218 54 217 57 217 59C216 61 215 64 215 65C214 66 214 68 213 69C212 70 212 72 212 73C211 74 211 77 210 79C209 81 209 82 209 83C210 84 210 84 208 87C208 88 207 91 207 93C207 95 206 97 205 98C204 100 204 101 204 101C204 102 200 110 199 112C196 118 196 117 197 118C198 118 198 120 199 121C199 122 199 124 200 124C201 125 201 126 201 128C201 129 201 130 202 130C202 130 202 131 202 132C202 134 202 135 203 135C204 136 204 136 202 139C201 141 201 142 201 144C201 144 201 146 201 148C200 149 200 152 200 154C199 156 199 159 198 159C198 160 197 162 197 163C197 164 196 166 195 167C194 168 193 169 193 170C193 170 193 171 192 171C187 175 187 179 190 186C194 194 194 197 190 200C186 204 188 209 195 211C200 212 201 212 200 213C200 215 201 215 205 217L208 219 207 220C205 221 205 222 207 223C207 223 208 224 208 224C208 224 209 225 209 226C211 228 212 230 212 233C213 236 217 238 218 236C222 228 222 211 218 205C218 204 217 203 217 202C216 200 215 198 214 197C213 197 212 195 212 194C210 191 204 187 198 185C196 185 198 183 204 181C210 180 215 180 220 181C222 182 224 182 225 183C225 183 227 183 228 183C234 186 235 185 232 180C231 179 229 177 229 176C229 175 228 173 227 171C225 166 224 162 226 164C227 165 227 164 226 160C226 159 226 156 226 155C226 154 226 151 225 148C225 144 225 140 226 140C226 140 226 140 226 141C226 141 226 142 226 142C227 142 227 140 227 139C227 133 229 123 231 121C231 121 232 119 233 118C234 114 235 112 236 112C237 112 237 111 238 109C239 107 241 104 241 103C242 102 244 99 246 97C248 94 250 92 252 92C253 91 255 90 256 89C259 86 268 80 272 79C282 75 294 60 291 54C291 54 291 53 291 51C29Line truncated

After

Width:  |  Height:  |  Size: 321 KiB

Binary file not shown.
Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 98 KiB

+1 -31
View File
@@ -1,31 +1 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Photocraft app icon. Original design by the Photocraft authors. MIT OR Apache-2.0. -->
<svg xmlns="http://www.w3.org/2000/svg" width="1024" height="1024" viewBox="0 0 1024 1024">
<defs>
<linearGradient id="bg" x1="0" y1="0" x2="0" y2="1">
<stop offset="0" stop-color="#3A3A3D"/>
<stop offset="1" stop-color="#1C1C1E"/>
</linearGradient>
<radialGradient id="lens" cx="0.42" cy="0.38" r="0.7">
<stop offset="0" stop-color="#9FD0FF"/>
<stop offset="1" stop-color="#2A78D6"/>
</radialGradient>
<clipPath id="disc"><circle cx="512" cy="512" r="300"/></clipPath>
</defs>
<!-- Body: Apple's 824/1024 grid, so the icon sits correctly in the macOS Dock. -->
<rect x="100" y="100" width="824" height="824" rx="185" fill="url(#bg)"/>
<rect x="100.5" y="100.5" width="823" height="823" rx="184.5" fill="none" stroke="#FFFFFF" stroke-opacity="0.08"/>
<!-- Aperture: six blades around a hexagonal opening. -->
<circle cx="512" cy="512" r="318" fill="#141416"/>
<g clip-path="url(#disc)" stroke="#141416" stroke-width="12" stroke-linejoin="round">
<path d="M409.8,453.0 L216.6,564.5 A300,300 0 0 0 409.8,794.1 L409.8,571.0 Z" fill="#5AA6FF"/>
<path d="M409.8,571.0 L409.8,794.1 A300,300 0 0 0 705.2,741.5 L512.0,630.0 Z" fill="#378EF0"/>
<path d="M512.0,630.0 L705.2,741.5 A300,300 0 0 0 807.4,459.5 L614.2,571.0 Z" fill="#2A78D6"/>
<path d="M614.2,571.0 L807.4,459.5 A300,300 0 0 0 614.2,229.9 L614.2,453.0 Z" fill="#1F64BA"/>
<path d="M614.2,453.0 L614.2,229.9 A300,300 0 0 0 318.8,282.5 L512.0,394.0 Z" fill="#2A78D6"/>
<path d="M512.0,394.0 L318.8,282.5 A300,300 0 0 0 216.6,564.5 L409.8,453.0 Z" fill="#378EF0"/>
<path d="M512.0,394.0 L614.2,453.0 L614.2,571.0 L512.0,630.0 L409.8,571.0 L409.8,453.0 Z" fill="url(#lens)" stroke="none"/>
</g>
<!-- A highlight glint in the opening. -->
<ellipse cx="478" cy="468" rx="34" ry="20" transform="rotate(-30 478 468)" fill="#FFFFFF" fill-opacity="0.55"/>
</svg>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><defs><clipPath id="t"><rect width="512" height="512" rx="112"/></clipPath></defs><g clip-path="url(#t)"><rect width="512" height="512" fill="#2f7bf5"/><path fill="#efe9dc" fill-rule="evenodd" d="M115.5 493.2C115.1 493 114.5 492.3 114.2 491.9C113.9 491.4 113.5 491 113.3 491C113.2 491 112.6 490.5 112.2 489.9C111.2 488.4 111.1 488.5 111.1 490.1C111.1 491.4 110.7 492.4 110.2 492.1C110.1 492 109.8 492.3 109.6 492.6C108.6 494.1 107.3 493.1 106.5 490.2C106 488.5 105.8 488.2 105.3 488C104.9 487.8 104.3 487.4 103.8 487C103.3 486.4 102.9 486.2 102.5 486.4C102 486.5 101.6 486.1 102 485.7C102.3 485.3 102.3 485 101.9 485C101.8 485 101.1 485.7 100.4 486.5C98.6 488.7 98.1 488.6 97.7 485.8C97.5 483.7 97.2 483.5 95.5 483.7L94.2 483.9 93.3 485.6C91.8 488.3 91.3 488.4 90.8 486.1C90.2 483.9 90.2 483.8 88.6 483.6C87.8 483.5 86.9 483.3 86.6 483.1C85.8 482.6 84.6 483.3 83.8 484.7C83.1 485.9 83 486 82.3 485.1C81.9 484.5 81.8 484.5 81.3 484.7C80 485.4 79 484.7 78.4 482.4C78.1 481.6 77.8 480.7 77.7 480.6C77.4 480.2 77.6 478.7 78.1 477.2C78.2 476.8 78.3 475.5 78.4 474.4C78.4 472.5 78.5 472.2 79.7 469.5C81.1 466.4 81.9 465.5 83.1 465C85.5 464.1 85.4 464.2 85.7 462.1C86.2 458.7 87.6 456.5 90.5 454.7C91.5 454 92.7 452.9 93.5 451.9C94.8 450.3 95.1 450.1 97.1 449.5C98.1 449.2 100.1 448.2 101.9 447.1C102.4 446.8 103.2 446.5 103.7 446.5C104.7 446.5 104.8 446.2 105.2 443.2C105.7 440.2 104.7 419.7 104.1 418.8C104.1 418.7 103.9 417 103.6 415C103.4 413 103 410.1 102.8 408.6C102.5 407.1 102.2 405 102 403.9C101.7 401.9 101.3 399.9 100.6 396.6C100.4 395.7 100.1 394.3 100 393.6C99.9 392.9 99.5 391.4 99.1 390.2C98.7 389.1 98.3 387.6 98.1 387C97.9 386.4 97.3 383.7 96.6 381.1C96 378.5 95.2 375.4 94.9 374.1C93.7 369.5 93.2 367.6 93 366.1C92.6 364 92.2 362.2 92 361.5C91.8 360.9 91 357.4 89.6 350.6C89.3 349 88.8 346.9 88.5 346.1C87.9 344.3 87.8 343.2 87.6 340.1C87.5 337.5 87.3 336.4 86.9 336C86.2 335.5 85.8 337.3 85.6 340.8C85.4 343.6 85.4 344 85 344C84.5 344 84.4 343.7 84.1 342C83.8 339.4 82.8 335.2 82.5 335.2C82.4 335.2 81.9 335.9 81.5 336.6C81.1 337.4 80.6 337.9 80.5 337.9C80.2 337.7 80.2 335.6 80.5 333C80.8 330 79.7 328.5 78.2 329.9C77.5 330.6 76.9 330.5 77.1 329.7C77.4 328.9 76.1 322.1 75.7 321.8C75.5 321.7 75.3 321.9 75.1 322.1C75 322.4 74.5 323 74.2 323.4C73.2 324.6 72.8 324.2 73.2 322.3C73.9 318.9 74 317.2 73.7 316.2C73.3 314.7 72.8 313.7 72.5 313.9C72.4 314 72.2 313.9 72.2 313.7C72.2 312.4 71.2 316.8 71.1 318.5C71 321.2 70.2 320.1 69.1 315.8C68.5 313.4 68.2 312.5 68 312.5C67.8 312.5 67.1 314.8 66.9 316.4C66.5 319 65.3 318.6 64.6 315.6C64.4 314.7 64 313.3 63.7 312.6C63.3 311.6 63.2 311 63.3 309.5C63.4 307.3 63 304.9 62.5 304.8C62.3 304.8 61.9 305.2 61.6 305.8C60.8 307.1 60.5 306.8 60.5 304.6C60.5 302.7 58.7 296.3 58 295.6C57.7 295.3 56.3 296.9 56.2 297.5C56.2 298.1 55.2 300.1 54.9 300.1C54.7 300.1 54.5 299.5 54.4 298.7C54.3 298 54 295.7 53.6 293.8C53.2 291.8 52.9 289.5 52.9 288.7C52.9 287.1 52.8 287 52 287.9C51.5 288.4 51.5 288.5 51.8 288.5C52.1 288.5 52.2 288.4 52.1 288.2C52 288.1 52.1 288 52.2 288C52.9 288 52.4 288.8 51.7 288.9C51.2 289 50.8 289.4 50.4 290C48.7 292.6 49 289.5 50.9 284.8C51.8 282.5 51.8 282.2 51.8 279.5C51.8 276 51.6 275.7 50.2 277.3C49.1 278.5 48.5 279.8 48.5 281.2C48.5 282.2 48.2 282.4 47.4 281.9C46.9 281.5 46.8 281.2 46.8 280.5C46.8 280 46.7 278.9 46.6 277.9C46.5 276.7 46.5 275.8 46.9 274.7C47.2 273.6 47.2 272.8 47.1 271.4C47 270.4 46.9 268.9 46.9 268.1C46.9 267.3 46.8 266.5 46.8 266.4C46.7 266.1 45.6 267.3 44.9 268.4C44.5 269.1 44.1 269.4 44 269.3C43.5 269.1 43.9 266.4 44.7 264C45.8 260.8 45.7 258 44.5 259.1C43.7 259.8 43.7 259.6 43.8 255.3C44 251.1 44 250.8 45.4 246.2C45.7 245.3 44.9 245.8 42.7 247.9C39.9 250.7 39.4 250.5 41.1 247.5C42.1 245.6 43.3 242.8 45 238.4C45.3 237.8 46.1 236.1 46.8 234.7C47.5 233.4 48 232.2 47.9 232.1C47.8 232 46.6 233 45.2 234.4C43.2 236.3 42.7 236.7 42.4 236.5C42 236.2 42.1 235.5 42.5 235.5C42.8 235.5 45 231 45 230.4C45 230.2 45.2 229.5 45.5 229C46.1 227.7 46.4 226.5 46 226.5C45.9 226.5 44.9 227.5 43.8 228.6C41.2 231.4 40.4 231.5 42.1 228.9C43.3 227.2 45.7 222.2 45.7 221.7C45.7 221.4 45.9 221.2 46.1 221.2C46.3 221.2 46.5 221 46.5 220.8C46.5 220.5 46.6 220.2 46.8 220.2C46.9 220.2 47 220.1 47 220C47 219.4 45.5 220.5 43.6 222.4C41.4 224.7 41 224.8 41.7 222.7C42.3 221.2 42.5 220.8 45.4 216.3C48.4 211.6 49.1 210.2 48.7 209.4C48.5 209 48.2 208.8 48 208.8C47.5 208.7 44.8 210.5 44.3 211.2C43.9 211.8 42.6 212.6 42.4 212.3C42.3 212.2 43.2 210.8 44.3 209.2C45.4 207.6 46.4 205.9 46.6 205.4C46.9 205 47.4 204.3 47.8 203.8C48.4 203.2 48.5 202.9 48.4 202.5C48.3 202.1 48.4 201.7 48.7 201.4C49.2 200.9 49.4 200.9 49.6 201.6C49.7 202.1 49.7 202.1 50.5 201.3C51.5 200.3 51.2 199.4 49.9 199.7C48.8 199.8 47.8 200.3 47.8 200.5C47.8 200.6 47.3 200.7 46.8 200.7C46.3 200.7 45.5 200.7 44.9 200.8C43.6 201.1 43.7 200.8 45.5 198.7C46.4 197.7 47.3 196.4 47.7 195.8C48 195.1 48.9 193.7 49.5 192.6C50.3 191.3 50.9 189.8 51.2 188.6C51.5 187.2 51.7 186.8 52.1 186.8C52.6 18Line truncated

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 751 KiB

+3 -2
View File
@@ -182,8 +182,9 @@ The keychain is deleted at the end of the job.
## Icons
`assets/app-icon/photocraft.svg` is our own artwork (MIT OR Apache-2.0, see `LICENSE.txt`
there). `packaging/icons.sh` regenerates the 1024 px PNG, the `.icns`, the `.ico` (packed by
`assets/app-icon/photocraft.svg` is the canonical icon: the owner's ArtCraft drawing of a
nine-tailed kitsune, vectorised (MIT OR Apache-2.0, see `LICENSE.txt` there; palette and
geometry in `README.md`). `packaging/icons.sh` regenerates the 1024 px PNG, the `.icns`, the `.ico` (packed by
`cargo xtask ico`) and the hicolor PNGs from it. It needs `resvg`, plus `iconutil` on macOS.
The outputs are committed, so packaging never needs those tools.
+13 -8
View File
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
# Regenerate every app icon from assets/app-icon/photocraft.svg.
# Regenerate every app icon from assets/app-icon/photocraft.svg (the canonical master).
#
# Needs: resvg (brew install resvg / cargo install resvg). On macOS, iconutil also writes the
# .icns. The outputs are committed, so packaging never needs these tools.
@@ -14,14 +14,18 @@ trap 'rm -rf "$TMP"' EXIT
command -v resvg >/dev/null || { echo "error: resvg not found (brew install resvg)" >&2; exit 1; }
# macOS icons keep Apple's 824/1024 body grid (transparent margin). Windows and Linux icons are
# cropped tighter so the shape reads at 16-48 px.
# The artwork is a full-bleed 512-unit tile (rx=112). macOS icons pad it to Apple's 824/1024 body
# grid (transparent margin). Windows and Linux icons crop 22 units off each side (into the
# rounded corners) so the portrait reads at 16-48 px.
grep -q 'viewBox="0 0 512 512"' "$SVG" || { echo "error: expected viewBox=\"0 0 512 512\" in $SVG" >&2; exit 1; }
MAC="$TMP/mac.svg"
sed 's/viewBox="0 0 512 512"/viewBox="-62 -62 636 636"/' "$SVG" >"$MAC"
TIGHT="$TMP/tight.svg"
sed 's/viewBox="0 0 1024 1024"/viewBox="88 88 848 848"/' "$SVG" >"$TIGHT"
sed 's/viewBox="0 0 512 512"/viewBox="22 22 468 468"/' "$SVG" >"$TIGHT"
render() { resvg -w "$2" -h "$2" "$1" "$3" </dev/null; }
render "$SVG" 1024 "$DIR/photocraft-1024.png"
render "$MAC" 1024 "$DIR/photocraft-1024.png"
# Linux hicolor theme.
for s in 16 24 32 48 64 128 256 512; do
@@ -29,7 +33,8 @@ for s in 16 24 32 48 64 128 256 512; do
render "$TIGHT" "$s" "$DIR/hicolor/${s}x${s}/apps/ai.storyteller.photocraft.png"
done
mkdir -p "$DIR/hicolor/scalable/apps"
cp "$SVG" "$DIR/hicolor/scalable/apps/ai.storyteller.photocraft.svg"
# The lighter trace (photocraft-small.svg) keeps the scalable theme icon cheap to render.
cp "$DIR/photocraft-small.svg" "$DIR/hicolor/scalable/apps/ai.storyteller.photocraft.svg"
# Windows .ico.
ICO_PNGS=()
@@ -44,8 +49,8 @@ if command -v iconutil >/dev/null; then
SET="$TMP/photocraft.iconset"
mkdir -p "$SET"
for s in 16 32 128 256 512; do
render "$SVG" "$s" "$SET/icon_${s}x${s}.png"
render "$SVG" $((s * 2)) "$SET/icon_${s}x${s}@2x.png"
render "$MAC" "$s" "$SET/icon_${s}x${s}.png"
render "$MAC" $((s * 2)) "$SET/icon_${s}x${s}@2x.png"
done
iconutil -c icns -o "$DIR/photocraft.icns" "$SET"
else