[PR #416] [CLOSED] macOS: fix missing symbolic icons and improve app icon #410

Closed
opened 2026-05-05 22:18:32 -06:00 by gitea-mirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/feschber/lan-mouse/pull/416
Author: @jondkinney
Created: 4/23/2026
Status: Closed

Base: mainHead: macos-icon-fixes


📝 Commits (2)

  • 2122750 bundle Adwaita symbolic icons in gresource
  • f095fb5 makeicns.sh: produce Big Sur+ style macOS app icon

📊 Changes

15 files changed (+141 additions, -13 deletions)

View changed files

lan-mouse-gtk/resources/icons/scalable/actions/edit-copy-symbolic.svg (+4 -0)
lan-mouse-gtk/resources/icons/scalable/actions/edit-delete-symbolic.svg (+4 -0)
lan-mouse-gtk/resources/icons/scalable/actions/emblem-ok-symbolic.svg (+4 -0)
lan-mouse-gtk/resources/icons/scalable/actions/list-add-symbolic.svg (+4 -0)
lan-mouse-gtk/resources/icons/scalable/actions/object-rotate-right-symbolic.svg (+4 -0)
lan-mouse-gtk/resources/icons/scalable/actions/object-select-symbolic.svg (+4 -0)
lan-mouse-gtk/resources/icons/scalable/actions/open-menu-symbolic.svg (+8 -0)
lan-mouse-gtk/resources/icons/scalable/actions/process-stop-symbolic.svg (+4 -0)
lan-mouse-gtk/resources/icons/scalable/devices/auth-fingerprint-symbolic.svg (+4 -0)
lan-mouse-gtk/resources/icons/scalable/devices/network-wired-symbolic.svg (+4 -0)
lan-mouse-gtk/resources/icons/scalable/places/user-trash-symbolic.svg (+8 -0)
lan-mouse-gtk/resources/icons/scalable/status/dialog-warning-symbolic.svg (+4 -0)
lan-mouse-gtk/resources/icons/scalable/status/network-wired-disconnected-symbolic.svg (+7 -0)
📝 lan-mouse-gtk/resources/resources.gresource.xml (+18 -0)
📝 scripts/makeicns.sh (+60 -13)

📄 Description

Summary

Two macOS-specific fixes:

  • Symbolic icons render as "image-missing" placeholders. The GTK frontend references Adwaita symbolic icon names (edit-copy-symbolic, auth-fingerprint-symbolic, network-wired-symbolic, dialog-warning-symbolic, etc.) but the Adwaita icon theme isn't installed on macOS by default. Bundling adwaita-icon-theme via Homebrew doesn't reliably fix it either — an .app launched from Finder inherits a minimal XDG_DATA_DIRS that doesn't include /opt/homebrew/share, so GTK can't find the theme at runtime.

    Fix: bundle the needed symbolic SVGs directly into the embedded gresource under the standard scalable/{actions,devices,places,status}/ hicolor layout. The existing IconTheme::add_resource_path("/de/feschber/LanMouse/icons") call already tells GTK to search this prefix, so no Rust changes are needed. This makes the app self-contained on macOS with no runtime dependency on a system icon theme.

  • Dock/Finder app icon looks oversized and square. The existing makeicns.sh produced a 1024×1024 icon with no squircle background and no transparent padding, so macOS rendered it noticeably larger than first-party apps and without the rounded-square shape users expect.

    Fix: rewrite the script to follow Apple's Big Sur+ icon template — 1024 canvas, 824 white squircle centered with 100px transparent padding, artwork rendered at 560 centered inside the squircle, ~22.5% corner radius. Use rsvg-convert to rasterize the SVG reliably (ImageMagick crops this particular SVG) then composite onto the squircle.

After changes - in the Dock:

CleanShot 2026-04-23 at 14 04 58@2x CleanShot 2026-04-23 at 15 35 15@2x

Test plan

  • Build the GTK frontend on macOS — symbolic icons now render correctly for hostname-copy, certificate fingerprint, authorize, emulation/capture status rows, connection rows (network-wired, edit-delete), etc.
  • scripts/makeicns.sh produces a valid target/icon.icns; bundled app icon appears in the Dock/Finder with proper squircle shape and sizing consistent with other macOS apps.
  • Linux/Windows builds unchanged — makeicns.sh is only invoked from the two macOS jobs in .github/workflows/release.yml, and the gresource addition is pure data (new files + XML entries, no code changes).

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/feschber/lan-mouse/pull/416 **Author:** [@jondkinney](https://github.com/jondkinney) **Created:** 4/23/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `macos-icon-fixes` --- ### 📝 Commits (2) - [`2122750`](https://github.com/feschber/lan-mouse/commit/212275031b175d341a002c9832c35c0ae953d530) bundle Adwaita symbolic icons in gresource - [`f095fb5`](https://github.com/feschber/lan-mouse/commit/f095fb54446c9e74466101ce0f6f1e6299570241) makeicns.sh: produce Big Sur+ style macOS app icon ### 📊 Changes **15 files changed** (+141 additions, -13 deletions) <details> <summary>View changed files</summary> ➕ `lan-mouse-gtk/resources/icons/scalable/actions/edit-copy-symbolic.svg` (+4 -0) ➕ `lan-mouse-gtk/resources/icons/scalable/actions/edit-delete-symbolic.svg` (+4 -0) ➕ `lan-mouse-gtk/resources/icons/scalable/actions/emblem-ok-symbolic.svg` (+4 -0) ➕ `lan-mouse-gtk/resources/icons/scalable/actions/list-add-symbolic.svg` (+4 -0) ➕ `lan-mouse-gtk/resources/icons/scalable/actions/object-rotate-right-symbolic.svg` (+4 -0) ➕ `lan-mouse-gtk/resources/icons/scalable/actions/object-select-symbolic.svg` (+4 -0) ➕ `lan-mouse-gtk/resources/icons/scalable/actions/open-menu-symbolic.svg` (+8 -0) ➕ `lan-mouse-gtk/resources/icons/scalable/actions/process-stop-symbolic.svg` (+4 -0) ➕ `lan-mouse-gtk/resources/icons/scalable/devices/auth-fingerprint-symbolic.svg` (+4 -0) ➕ `lan-mouse-gtk/resources/icons/scalable/devices/network-wired-symbolic.svg` (+4 -0) ➕ `lan-mouse-gtk/resources/icons/scalable/places/user-trash-symbolic.svg` (+8 -0) ➕ `lan-mouse-gtk/resources/icons/scalable/status/dialog-warning-symbolic.svg` (+4 -0) ➕ `lan-mouse-gtk/resources/icons/scalable/status/network-wired-disconnected-symbolic.svg` (+7 -0) 📝 `lan-mouse-gtk/resources/resources.gresource.xml` (+18 -0) 📝 `scripts/makeicns.sh` (+60 -13) </details> ### 📄 Description ## Summary Two macOS-specific fixes: - **Symbolic icons render as "image-missing" placeholders.** The GTK frontend references Adwaita symbolic icon names (`edit-copy-symbolic`, `auth-fingerprint-symbolic`, `network-wired-symbolic`, `dialog-warning-symbolic`, etc.) but the Adwaita icon theme isn't installed on macOS by default. Bundling `adwaita-icon-theme` via Homebrew doesn't reliably fix it either — an `.app` launched from Finder inherits a minimal `XDG_DATA_DIRS` that doesn't include `/opt/homebrew/share`, so GTK can't find the theme at runtime. Fix: bundle the needed symbolic SVGs directly into the embedded gresource under the standard `scalable/{actions,devices,places,status}/` hicolor layout. The existing `IconTheme::add_resource_path("/de/feschber/LanMouse/icons")` call already tells GTK to search this prefix, so no Rust changes are needed. This makes the app self-contained on macOS with no runtime dependency on a system icon theme. - **Dock/Finder app icon looks oversized and square.** The existing `makeicns.sh` produced a 1024×1024 icon with no squircle background and no transparent padding, so macOS rendered it noticeably larger than first-party apps and without the rounded-square shape users expect. Fix: rewrite the script to follow Apple's Big Sur+ icon template — 1024 canvas, 824 white squircle centered with 100px transparent padding, artwork rendered at 560 centered inside the squircle, ~22.5% corner radius. Use `rsvg-convert` to rasterize the SVG reliably (ImageMagick crops this particular SVG) then composite onto the squircle. After changes - in the Dock: <img width="702" height="572" alt="CleanShot 2026-04-23 at 14 04 58@2x" src="https://github.com/user-attachments/assets/f9c95def-838f-4b71-a759-4fe79daada41" /> <img width="1600" height="2262" alt="CleanShot 2026-04-23 at 15 35 15@2x" src="https://github.com/user-attachments/assets/e712b81c-c291-49f7-9d38-0af75c1c0c78" /> ## Test plan - [x] Build the GTK frontend on macOS — symbolic icons now render correctly for hostname-copy, certificate fingerprint, authorize, emulation/capture status rows, connection rows (network-wired, edit-delete), etc. - [x] `scripts/makeicns.sh` produces a valid `target/icon.icns`; bundled app icon appears in the Dock/Finder with proper squircle shape and sizing consistent with other macOS apps. - [ ] Linux/Windows builds unchanged — `makeicns.sh` is only invoked from the two macOS jobs in `.github/workflows/release.yml`, and the gresource addition is pure data (new files + XML entries, no code changes). 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
gitea-mirror 2026-05-05 22:18:32 -06:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/lan-mouse#410
No description provided.