Skip to content

fix: adjust icon size for macOS platform compatibility#418

Merged
siddharthvaddem merged 2 commits intosiddharthvaddem:mainfrom
Orchardxyz:fix/icon-size
Apr 11, 2026
Merged

fix: adjust icon size for macOS platform compatibility#418
siddharthvaddem merged 2 commits intosiddharthvaddem:mainfrom
Orchardxyz:fix/icon-size

Conversation

@Orchardxyz
Copy link
Copy Markdown
Contributor

@Orchardxyz Orchardxyz commented Apr 11, 2026

Pull Request

Description

This PR fixes the macOS app icon appearing visually larger than other apps.

Motivation

Users reported that the app icon looked oversized in the macOS Dock and bar, which made the app feel visually inconsistent with other installed applications.

Type of Change

  • New Feature
  • Bug Fix
  • Refactor / Code Cleanup
  • Documentation Update
  • Other (please specify)

Related Issue(s)

N/A

Screenshots / Video

Before

image

After

image

Summary by CodeRabbit

  • Bug Fixes
    • System tray icons now use platform-appropriate sizing so icons appear consistent and crisp on macOS and other operating systems. The default and recording tray icons have been updated to render at the correct dimensions, improving visual clarity and alignment in the system tray.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 11, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 68b8f973-c990-4dbb-a580-9031466a6f31

📥 Commits

Reviewing files that changed from the base of the PR and between 33a60fe and d526ab4.

📒 Files selected for processing (1)
  • electron/main.ts

📝 Walkthrough

Walkthrough

Made tray icon sizing platform-aware by adding isMac (checks process.platform === "darwin") and passing a derived trayIconSize into getTrayIcon, which now accepts (filename: string, size: number) and resizes icons to 18x18 on macOS or 24x24 elsewhere.

Changes

Cohort / File(s) Summary
Tray icon sizing change
electron/main.ts
Added isMac and trayIconSize, changed getTrayIcon signature to (filename: string, size: number), and replaced fixed 24x24 nativeImage.resize with dynamic size for width and height.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

a tiny icon, size-aware and sly 🐭
checks for darwin, keeps the pixels shy
eighteen for mac, twenty-four for the rest
nit: cleaner signature—lowkey not the worst ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title directly describes the main change: adjusting icon size for macOS compatibility, which aligns with the code modifications to determine tray icon dimensions based on platform.
Description check ✅ Passed The description includes all critical sections: clear problem statement, motivation explaining user impact, correct bug fix categorization, before/after screenshots, but lacks testing instructions and checklist completion.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
electron/main.ts (1)

65-69: nit: extract tray icon size once (cleaner/less repeaty).

Behavior is good, but this can be a tiny DRY win by computing one trayIconSize and reusing it.

Optional cleanup diff
 const isMac = process.platform === "darwin";
+const trayIconSize = isMac ? 18 : 24;

 // Tray Icons
-const defaultTrayIcon = getTrayIcon("openscreen.png", isMac ? 18 : 24);
-const recordingTrayIcon = getTrayIcon("rec-button.png", isMac ? 18 : 24);
+const defaultTrayIcon = getTrayIcon("openscreen.png", trayIconSize);
+const recordingTrayIcon = getTrayIcon("rec-button.png", trayIconSize);
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@electron/main.ts` around lines 65 - 69, The tray icon size is computed twice;
extract a single trayIconSize variable and reuse it: create trayIconSize = isMac
? 18 : 24 (where isMac is already defined) and pass trayIconSize to getTrayIcon
calls for defaultTrayIcon and recordingTrayIcon instead of repeating the ternary
expression; update references to getTrayIcon("openscreen.png", trayIconSize) and
getTrayIcon("rec-button.png", trayIconSize).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@electron/main.ts`:
- Around line 65-69: The tray icon size is computed twice; extract a single
trayIconSize variable and reuse it: create trayIconSize = isMac ? 18 : 24 (where
isMac is already defined) and pass trayIconSize to getTrayIcon calls for
defaultTrayIcon and recordingTrayIcon instead of repeating the ternary
expression; update references to getTrayIcon("openscreen.png", trayIconSize) and
getTrayIcon("rec-button.png", trayIconSize).

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 4e1314b6-b99c-4d94-8508-f8917947e919

📥 Commits

Reviewing files that changed from the base of the PR and between 68295b2 and 33a60fe.

📒 Files selected for processing (2)
  • electron/main.ts
  • icons/icons/mac/icon.icns

Copy link
Copy Markdown
Contributor

@LorenzoLancia LorenzoLancia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Although simple, this PR appears to address an important visual issue for macOS users. It might be worth confirming that 18x18 works well across different macOS displays and scaling settings, but the change looks solid 👍

Why did you choose 18x18 when the official documentation lists the recommended size as:
https://developer.apple.com/design/human-interface-guidelines/icons?utm_source=chatgpt.com
https://it.wikipedia.org/wiki/Apple_Icon_Image

@Orchardxyz
Copy link
Copy Markdown
Contributor Author

Although simple, this PR appears to address an important visual issue for macOS users. It might be worth confirming that 18x18 works well across different macOS displays and scaling settings, but the change looks solid 👍

Why did you choose 18x18 when the official documentation lists the recommended size as: https://developer.apple.com/design/human-interface-guidelines/icons?utm_source=chatgpt.com https://it.wikipedia.org/wiki/Apple_Icon_Image

@LorenzoLancia Thanks for the review! You're right — 18×18 doesn't align with Apple's recommended tray icon size. I've updated it to 16×16 for macOS

@siddharthvaddem siddharthvaddem merged commit bbf75a2 into siddharthvaddem:main Apr 11, 2026
5 checks passed
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.

3 participants