fix(pack): pad macOS app icon to the HIG safe area (#1751) (#4282)

The macOS source icon's squircle was full-bleed — its artwork filled the
entire 1024×1024 canvas edge-to-edge (alpha bbox = 0,0,1024,1024). macOS
renders the app-bundle icon as-is in the Dock and Launchpad, so a full-bleed
mark reads optically larger than neighboring apps whose icon body sits inside
the standard safe area, which is the "oversized icon" reported in #1751.

Re-composite the artwork to the Apple macOS app-icon template body size —
824×824 centered in 1024×1024 (≈80.5% occupancy, 100 px margin per side per
the HIG) — and rebuild icon.icns from the padded master (full 16→1024
@1x/@2x size set). Scoped to the macOS packaging assets:
tools/pack/resources/mac/icon.{png,icns}. The web app-icon.svg/png stay
full-bleed (web icons aren't slotted/masked like the Dock), and linux/win
assets are out of scope for this macOS-only report.

icon.icns is the asset electron-builder actually ships (mac.icon + dmg.icon
in tools/pack/src/mac/builder.ts); icon.png is the source-of-truth and is
updated to match.

The .icns is assembled directly from oxipng-optimized PNG entries (not via
iconutil, which re-encodes and produced a 1.12 MB blob that tripped the
1 MiB changed-file guard). Hand-packing the standard icns type set
(icp4/icp5/ic07–ic14) keeps it lossless at 731 KB, comfortably under the
guard. Verified valid: `iconutil -c iconset` round-trips it back to all 10
sizes, and the 1024 representation retains the 824×824 padded bbox.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Max Hsu
2026-06-14 08:59:12 +00:00
committed by GitHub
co-authored by Claude Opus 4.8
parent 3cf0611383
commit 7334768a78
2 changed files with 0 additions and 0 deletions
Binary file not shown.
Binary file not shown.

Before

Width:  |  Height:  |  Size: 819 KiB

After

Width:  |  Height:  |  Size: 450 KiB