Skip to content

Apply squircle mask to Dock icon#5306

Merged
kodjima33 merged 1 commit intomainfrom
fix/desktop-app-icon-squircle-mask
Mar 3, 2026
Merged

Apply squircle mask to Dock icon#5306
kodjima33 merged 1 commit intomainfrom
fix/desktop-app-icon-squircle-mask

Conversation

@kodjima33
Copy link
Copy Markdown
Collaborator

Summary

  • NSApp.applicationIconImage renders raw images without macOS auto-masking, causing the icon to appear as a white square in the Dock
  • Apply squircle mask in Swift with 6% margin on each side to match standard macOS Dock icon sizing
  • Corner radius matches macOS continuous corners (~22.37%)

Test plan

  • Verified icon appears as proper squircle in Dock, matching size of other app icons
  • Tested with Omi Dev build locally

🤖 Generated with Claude Code

NSApp.applicationIconImage renders raw images without macOS auto-masking,
causing the icon to appear as a white square in the Dock. Apply the
squircle mask in Swift with 6% margin on each side to match standard
macOS Dock icon sizing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@kodjima33 kodjima33 merged commit 41483c0 into main Mar 3, 2026
2 checks passed
@kodjima33 kodjima33 deleted the fix/desktop-app-icon-squircle-mask branch March 3, 2026 06:21
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Mar 3, 2026

Greptile Summary

Fixes Dock icon rendering issue where NSApp.applicationIconImage displayed a white square instead of a proper rounded icon. Applies a squircle mask at runtime with 6% margins on each side and 22.37% corner radius to match macOS Dock icon standards.

Key Changes:

  • Creates masked icon using NSBezierPath clipping with continuous corners
  • Scales icon content to 88% of original size (6% margin per side)
  • Corner radius calculation matches macOS design guidelines

Technical Review:

  • Margin and radius calculations are mathematically correct
  • Drawing order and coordinate system usage are appropriate
  • Tested and verified according to PR description

Confidence Score: 5/5

  • This PR is safe to merge with no risks
  • Small, focused fix with correct implementation, no logic or syntax errors, and verified testing
  • No files require special attention

Important Files Changed

Filename Overview
desktop/Desktop/Sources/OmiApp.swift Applies squircle mask with 6% margins and 22.37% corner radius to fix Dock icon rendering

Last reviewed commit: 5958228

Glucksberg pushed a commit to Glucksberg/omi-local that referenced this pull request Apr 28, 2026
## Summary
- NSApp.applicationIconImage renders raw images without macOS
auto-masking, causing the icon to appear as a white square in the Dock
- Apply squircle mask in Swift with 6% margin on each side to match
standard macOS Dock icon sizing
- Corner radius matches macOS continuous corners (~22.37%)

## Test plan
- [x] Verified icon appears as proper squircle in Dock, matching size of
other app icons
- [x] Tested with Omi Dev build locally

🤖 Generated with [Claude Code](https://claude.com/claude-code)
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.

1 participant