mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-08-10 08:27:04 +00:00
macOS Big Sur+ mandates the squircle icon template for dock / Cmd+Tab — bare transparent logos stick out next to first-party apps. PlatformAppIcon wraps the source logo in a 1024x1024 white squircle with 10% padding at runtime, only when the host OS is macOS (PlatformInfo.host, not .current — the override is for in-app theming, the dock is drawn by the real OS). No extra image file: Java2D renders the squircle from the existing icon.png so Linux / Windows paths stay untouched (they still get the raw transparent logo, which is the right call for GNOME and matches Windows 11 taskbar rendering). Apple's true shape is a superellipse; Java2D lacks a primitive for it, so RoundRectangle2D with 22.5% corner radius is the practical approx (invisible difference at dock icon sizes). Applied to both java.awt.Taskbar.iconImage (dock) and Window(icon=) (title-bar thumb). https://claude.ai/code/session_01NufduPfZvYQVYwLkbCjCUo