fix: adjust icon size for macOS platform compatibility#418
fix: adjust icon size for macOS platform compatibility#418siddharthvaddem merged 2 commits intosiddharthvaddem:mainfrom
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughMade tray icon sizing platform-aware by adding Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ 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. Comment |
There was a problem hiding this comment.
🧹 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
trayIconSizeand 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
📒 Files selected for processing (2)
electron/main.tsicons/icons/mac/icon.icns
There was a problem hiding this comment.
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 |
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
Related Issue(s)
N/A
Screenshots / Video
Before
After
Summary by CodeRabbit