Repository navigation
fix(desktop): give Linux an icon set hicolor can find - #1
Merged
Merged
Conversation
The .deb shipped only the 1024x1024 icon.png. The freedesktop hicolor theme stops at 512x512, so `Icon=opennote` never resolved and Ubuntu drew the generic icon. make-icons.mjs now draws the same geometry at every hicolor size (16, 22, 24, 32, 48, 64, 128, 256, 512) into build/icons, and electron-builder's Linux icon points at that directory. icon.png and icon-mac.png come out byte-identical. The windows already set their own icon from dist/icon.png, so an unintegrated build still shows the mark in the dock. A test keeps the set at the sizes hicolor declares and is now part of `npm test`. Co-Authored-By: Claude Opus 5.5 <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 OpenNote 0.5.0
.deb(opennote-desktop) installs only/usr/share/icons/hicolor/1024x1024/apps/opennote.png. The hicolor theme only goes up to512x512, soIcon=opennoteinopennote.desktopnever finds an icon and Ubuntu shows the generic one.Fix
desktop/scripts/make-icons.mjsdraws the same geometry at every hicolor size (16, 22, 24, 32, 48, 64, 128, 256, 512) intodesktop/build/icons/NxN.png. The shapes are defined on the 1024 grid and drawn at each target size. Regenerating leavesicon.pngandicon-mac.pngbyte-for-byte the same.electron-builder.yml:linux.iconnow points tobuild/icons, so the.debinstallshicolor/<size>/apps/opennote.png.icon: appIcon()fromdist/icon.png, so an AppImage or build that was never integrated still shows the logo in the dock. No change was needed there.desktop/test/icons.test.mjs(node --test, now part of rootnpm test) checks thatbuild/iconscontains exactly the hicolor sizes and that each PNG header has the size in its file name.Verified
I built the package locally with
electron-builder --linux deb --x64and listed it withdpkg-deb -c. It containsusr/share/icons/hicolor/{16x16,22x22,24x24,32x32,48x48,64x64,128x128,256x256,512x512}/apps/opennote.pngand no1024x1024.🤖 Generated with Claude Code