Skip to content

Fix(macos): the Dock icon sits on Apple's icon grid (#544) - #545

Merged
adibhanna merged 1 commit into
mainfrom
fix/544-dock-icon-grid
Aug 5, 2026
Merged

adibhanna merged 1 commit into
mainfrom
fix/544-dock-icon-grid

Conversation

@adibhanna

Copy link
Copy Markdown
Contributor

Fixes #544.

What was wrong

ZenNotes rendered about 9% larger than every other icon in the Dock. Apple's grid draws a Dock icon as an 824px tile centered on the 1024px canvas; ours was drawn at 896px. @Christian-SC26's screenshot-ruler measurement (17.5px of slot headroom where stock apps get 23) matches that extra 72px of tile exactly.

There were two causes:

  1. The artwork was off the grid. build/icon.png and build/icon.icns are regenerated with the tile scaled to exactly 824px with 100px margins. The tile was already an Apple-style squircle, so a uniform rescale keeps the shape and lands the corner radius on spec. The regenerated icon also bakes the standard template drop shadow that Apple's own icns icons carry (checked against Notes.app).
  2. The installed app was overriding its own bundle icon at runtime. app.dock.setIcon(icon.png) exists as a dev-mode workaround (npm run dev shows Electron's default icon) but also ran in packaged builds, replacing the .icns with a raw NSImage and bypassing the system's icon treatment. It is now gated to !app.isPackaged.

What this deliberately does not do

The light appearance variant also requested in #544. Appearance-aware icons need the macOS 26 Icon Composer pipeline (a .icon compiled into Assets.car plus CFBundleIconName), which electron-builder cannot produce yet. Follow-up material, not a blocker for the size fix.

Cross-platform note: icon.png is the shared master, so the Windows ico generation and the non-mac window icons inherit the slightly larger padding; the Linux launcher icons in build/icons/ are deliberately untouched.

Verification

  • npm run pack green end to end (typecheck, all vitest suites, build, electron-builder).
  • The icns inside dist/mac-arm64/ZenNotes.app measures an exact 824px tile with 100px margins at the 1024 rep (solid-alpha span, shadow excluded).
  • Packaged-artifact launch check: ZEN_PERF=1 with both stores isolated, CDP page target "ZenNotes" up in 3s.
  • Live side by side: installed 2.22.0 and this build in the real Dock; the old tile visibly overshoots the row, the new one aligns with stock icons.

How to test locally: npm run pack, open dist/mac-arm64/ZenNotes.app, and park it in the Dock next to any stock app. Before: the enso tile pokes above its neighbors' top edges. After: the edges align, shadow and all.

ZenNotes loomed about 9% larger than every other icon in the Dock.
Apple's grid draws a Dock icon as an 824px tile centered on the 1024px
canvas; ours was drawn at 896px. The reporter measured it from the
outside, 17.5px of slot headroom where stock apps get 23, which is
exactly that extra 72px of tile.

Two causes, and fixing only the obvious one would not have been enough.
The artwork itself was off the grid: icon.png and icon.icns are
regenerated with the tile scaled to exactly 824px with 100px margins,
plus the soft drop shadow Apple's own icns icons bake in. And the
installed app was quietly overriding its bundle icon at runtime: the
dev-mode workaround (npm run dev shows Electron's default icon, so we
force our own) also ran in packaged builds, replacing the .icns with a
raw NSImage and bypassing the system's icon treatment. That call is now
gated to dev.

What this deliberately does not do: the light appearance variant also
asked for in #544. That needs the macOS 26 Icon Composer pipeline
(.icon compiled into Assets.car), which electron-builder cannot produce
yet; it stays open as a follow-up.

icon.png is the shared master, so the Windows ico generation and the
non-mac window icons inherit the slightly larger padding; the Linux
launcher icons in build/icons are deliberately untouched.

Verified on the packaged artifact: npm run pack green end to end, the
icns inside dist/mac-arm64/ZenNotes.app measures an exact 824px tile,
and the packaged app launches with a CDP page target in 3s with both
stores isolated.
@adibhanna adibhanna mentioned this pull request Aug 5, 2026
@adibhanna
adibhanna merged commit cfadc6f into main Aug 5, 2026
6 checks passed
@adibhanna
adibhanna deleted the fix/544-dock-icon-grid branch August 5, 2026 13:38
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.

Icon Update

1 participant