fix(brand): crisp taskbar & tray icons (optical-sizing .ico)#68
Open
rxm96 wants to merge 1 commit into
Open
Conversation
The taskbar and tray showed a pixelated icon: the only runtime icon source
was the 1024px dark-tile PNG, downscaled by Windows/Electron to ~16-32px.
At that size the droplet shrank, the white arrow collapsed, and the near-
black tile vanished against the dark taskbar. electron-builder can only
downscale a single PNG, so it can't fix this either.
Fix = optical sizing with real multi-size .ico files:
- icons/icon-small.svg: high-contrast violet tile for small sizes
- build-icon.mjs now renders both SVGs (one offscreen window + crop, then
high-quality resize) and packs Windows .ico files dependency-free:
icons/icon.ico 16/24/32/48 violet + 64/128/256 dark tile
icons/tray.ico 16/24/32 violet
- build.win.icon -> icons/icon.ico (crisp taskbar/installer/exe)
- BrowserWindow icon + Tray now use the .ico on Windows (icon.png elsewhere)
- icon.png (1024 dark tile) unchanged; still build.icon for macOS/default
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Problem
The taskbar and system-tray icon looked pixelated after the new logo landed (#67).
Root cause (verified)
icons/icon.pngis a genuine, crisp 1024×1024 — confirmed by inspecting the bitmap (sharp anti-aliased edges), so the file is fine. The issue is downscaling:.ico) and the tray (new Tray()).Fix — optical sizing with real multi-size
.icoSmall sizes get dedicated high-contrast artwork; large sizes keep the dark tile (as chosen for the desktop/installer icon).
icons/icon-small.svg— violet tile + white droplet, tighter padding, for sizes ≤ 48.scripts/build-icon.mjs— now rasterizes both SVGs in one offscreen window + one load (a second offscreendata:load fails withERR_FAILED), crops them apart, high-quality-resizes to each target, and packs Windows.icofiles with a small dependency-free ICO packer (PNG payloads):icons/icon.ico— 16/24/32/48 violet + 64/128/256 dark tileicons/tray.ico— 16/24/32 violetbuild.win.icon→icons/icon.icoso the taskbar/installer/exe get native crisp sizes.src/main/index.ts—BrowserWindownow setsicon, and the tray usestray.ico, on Windows (icon.pngelsewhere). Previously no window icon was set at all.icons/icon.png(1024 dark tile) is unchanged and staysbuild.iconfor macOS/default.Verification
format:check✓,typecheck✓ (main process changed),lint0 errors,npm test514 ✓,npm run build✓.npm run build:icon.Test plan
verifypasses.npm run dev→ tray + taskbar show the crisp violet icon.🤖 Generated with Claude Code