Skip to content

Fix macOS menu bar tray icon size - #35

Open
jordan-unchained wants to merge 2 commits into
unchained-capital:mainfrom
jordan-unchained:fix/macos-tray-icon
Open

Fix macOS menu bar tray icon size#35
jordan-unchained wants to merge 2 commits into
unchained-capital:mainfrom
jordan-unchained:fix/macos-tray-icon

Conversation

@jordan-unchained

@jordan-unchained jordan-unchained commented May 28, 2026

Copy link
Copy Markdown

Summary

On macOS, the GPG Bridge menu bar (tray) icon rendered roughly twice as large as neighboring system icons. This change tags the existing 32×32 PNG with scaleFactor: 2.0 so macOS treats it as a @2x asset and displays it at the correct 16pt height.

What changed

  • main.jscreateTray() now loads the tray image through nativeImage on darwin, re-encoding the PNG with scaleFactor: 2.0 before passing it to Tray.
  • Non-macOS platforms are unchanged and continue to use the file path directly.

Why not setTemplateImage?

icons/png/32x32.png is a full-color branded icon (cannon on a light background), not a monochrome template. Template mode strips color and tints opaque pixels, which makes the icon disappear or flatten into an unrecognizable blob in the menu bar.

Test plan

  • Launch GPG Bridge on macOS and confirm the menu bar icon height matches adjacent system icons (Wi-Fi, battery, etc.).
  • Confirm the icon still displays correctly on Windows and Linux (no change expected on those platforms).
  • Open the tray context menu and verify all existing menu items still work.

Tag the 32x32 PNG with scaleFactor 2.0 on darwin so it displays at 16pt
instead of appearing roughly twice as large as other menu bar icons.

Co-authored-by: Cursor <cursoragent@cursor.com>
Comment thread main.js Outdated
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.

2 participants