Update app icon for Sequoia#168
Merged
Merged
Conversation
Replace the manual AppIconLayout + scheme with a programmatic icon pipeline. Added AppIconRenderer (draws and exports icon images), AppIconGenerator (CLI entry) and AppIconPreview (SwiftUI preview), plus scripts/generate-app-icon.sh to compile the CLI and regenerate PNGs into the asset catalog. Removed AppIconLayout.swift and the App Icon Layout scheme, updated AppDelegate to drop the APP_ICON_HELPER startup flag, and updated the Xcode project to add the new sources. App icon PNGs in Images.xcassets were regenerated.
Remove standalone AppIconPreview.swift and consolidate preview into AppIconRenderer (behind #if DEBUG). Introduce AppIconLayout and AppIconFontFamily to centralize sizing, corner radius, tick/label metrics and canvasSize; add labelFont helper + font weight mapping. Tweak palette colors, adjust tick drawing (separate small tick path, updated spacing/lengths and stroke widths) and unify drawing to use the canvas constant. Update project.pbxproj to remove references to the deleted file and replace multiple AppIcon asset PNGs. These changes centralize layout constants, improve scaling and font handling, and refresh the app icon assets.
Adjust AppIconRenderer layout and drawing logic: increase corner radius, introduce rulerStartTick/rulerEndTick, fix tick spacing using a start/end range, and switch label font to system. Add configurable border drawing (outer and inset) with strokeBorder/drawBorder helpers and call drawBorder during rendering. Regenerate app icon image assets accordingly. Also add an npm script "generate:icons" to package.json to run scripts/generate-app-icon.sh.
Introduce an inset-based icon layout and visual refinements for the app icon renderer: compute a scaled iconRect, clip to a rounded icon shape, and add optional drop shadow (configurable offset, blur and opacity). Split label font sizes (unit vs tick), tweak unit label paddings, and adjust a minor ruler tick value. Consolidate drawing to use iconRect (ticks, labels, border) and restore graphics state properly. Also update generated app icon PNG assets to match the new rendering.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR modernizes the app icon workflow by replacing the old “icon layout helper window + screenshot” approach with a deterministic AppKit renderer + CLI to regenerate the AppIcon.appiconset PNGs, aligning with the Sequoia-style rounded-rect icon.
Changes:
- Added an AppKit-based icon renderer (
AppIconRenderer) that exports all required macOS app icon PNG sizes. - Added a small CLI entrypoint and a repo script (
scripts/generate-app-icon.sh), exposed vianpm run generate:icons. - Removed the old
APP_ICON_HELPERstartup path, theAppIconLayouthelper implementation, and the dedicated “App Icon Layout” Xcode scheme.
Reviewed changes
Copilot reviewed 9 out of 19 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| scripts/generate-app-icon.sh | Builds/runs a Swift CLI to regenerate AppIcon.appiconset PNGs. |
| package.json | Adds generate:icons npm script to run the icon generator. |
| Free Ruler/AppIconRenderer.swift | New AppKit renderer that draws and exports icon PNGs. |
| Free Ruler/AppIconGenerator.swift | New CLI entrypoint (behind APP_ICON_GENERATOR_CLI) to export icons. |
| Free Ruler/AppDelegate.swift | Removes icon-helper startup path; always launches normal rulers. |
| Free Ruler/AppIconLayout.swift | Deletes the legacy screenshot-based icon layout helper. |
| Free Ruler.xcodeproj/xcshareddata/xcschemes/App Icon Layout.xcscheme | Removes the obsolete helper scheme. |
| Free Ruler.xcodeproj/project.pbxproj | Removes old helper file; adds new icon renderer/generator files to the project/targets. |
| AGENTS.md | Updates contributor guidance to point to the new icon generation script. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Convert the AppIconGenerator entrypoint to a non-throwing CLI tool: print usage and errors to stderr, return meaningful exit codes, and add helpers (executableName, printError). Remove the now-unused AppIconGeneratorError. Tweak AppIconRenderer.createDirectory call to include attributes: nil. Update multiple app icon PNG assets in the AppIcon asset catalog.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related to #167
Will add support for Tahoe / IconComposer in a followup.