Skip to content

icon: source from Icon Composer export - #1

Merged
danielgormly merged 1 commit into
mainfrom
worktree-icon-refresh
Jul 27, 2026
Merged

icon: source from Icon Composer export#1
danielgormly merged 1 commit into
mainfrom
worktree-icon-refresh

Conversation

@danielgormly

Copy link
Copy Markdown
Owner

Adds icon/ — the Icon Composer source (icon.icon) plus its flattened 1024px export — and points tools/mkicon.sh at it instead of the loose Resources/AppIcon.png, which is now dropped (nothing else referenced it).

Why the compositing changed

The old Resources/AppIcon.png was a fully opaque square with its rounded corners baked into black pixels, so mkicon.sh overscaled the art by 1.06 to push those corners outside the clip path.

The new export doesn't need that — Icon Composer writes Apple's rounded-square mask into the alpha channel (corners are genuinely transparent, 6% of the canvas). Keeping the overscale would crop 6% of real art. And re-clipping with CGPath(roundedRect:) would shave the continuous "squircle" curve, since CGPath corners are plain circular arcs.

So the Swift step now just rescales the export onto the 824×824 macOS grid centred on a 1024×1024 transparent canvas. No clip, no overscale.

Verified

  • Regenerated Resources/AppIcon.icns; all ten iconset sizes present.
  • Extracted 512@2x measures 39.1% transparent, matching an 824px squircle body on a 1024px canvas.
  • Eyeballed a contact sheet at 512/128/32/16 on light and dark backgrounds — corners intact, no shaved edges, correct margin.

Also: mkicon.sh now prefers a icon-macOS-Default-* export if one is ever added, and errors with a pointer to Export All if the folder has no 1024px PNG.

🤖 Generated with Claude Code

Adds icon/icon.icon (the editable Icon Composer source) plus its flattened
1024px export, and points tools/mkicon.sh at them instead of the loose
Resources/AppIcon.png, which is now dropped.

The new export already carries Apple's rounded-square mask in its alpha
channel, so the old overscale-to-hide-baked-corners hack no longer applies --
it would crop 6% of the art. mkicon.sh now just rescales the export onto the
824x824 macOS grid without re-clipping, which also preserves the continuous
"squircle" corners that a CGPath rounded rect would shave.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@danielgormly
danielgormly merged commit 5592bf1 into main Jul 27, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant