Skip to content

fix: give Freizeichen an icon on every platform - #17

Merged
DeepDiver1975 merged 2 commits into
mainfrom
fix/app-icon
Oct 27, 2026
Merged

DeepDiver1975 merged 2 commits into
mainfrom
fix/app-icon

Conversation

@DeepDiver1975

Copy link
Copy Markdown
Collaborator

On GNOME, Freizeichen showed a generic icon in the app grid, the dock and Alt-Tab. The cause wasn't the desktop entry alone: the app had no icon at all. There was no icon asset in the repo, so neither desktop entry could name one (Icon= was missing) and no window set one (xprop showed no _NET_WM_ICON). Windows and macOS had no icon either.

The icon

src/Freizeichen.App/Assets/icon.svg is the master, styled after Lagebuch's icon: a handset sounding its dial tone, on Lagebuch's dark tile in its signal-red/amber, so the two read as one family. make icon (packaging/icon/build-icon-assets.sh, needs rsvg-convert and ImageMagick) renders the committed icon-1024.png and icon.ico from it. They're committed because the macOS and Windows runners have no SVG renderer.

The Freizeichen icon at 256 px The Freizeichen icon at 32 px

Where it goes

  • Linux .deb: hicolor icons at every size the theme declares (16 to 512) plus the scalable SVG. The entry gains Icon=freizeichen and StartupWMClass=Freizeichen (the window's WM_CLASS, checked with xprop). The package now depends on hicolor-icon-theme, which owns index.theme and refreshes the icon cache. A self-contained Avalonia app pulls in no GTK, so nothing else brings it in. CI installs librsvg2-bin to render the sizes and checks that the icons are installed.
  • Linux tarball: the entry that Als Standard festlegen writes names freizeichen.svg, which is now published beside the executable, and also gets StartupWMClass.
  • Windows: the exe embeds icon.ico (ApplicationIcon). The MSI uses it for the Start menu shortcut and the Installed apps entry (ARPPRODUCTICON).
  • macOS: build-dmg.sh builds Freizeichen.icns from the 1024 render with sips/iconutil and names it in Info.plist.
  • Both windows set Icon. The window icon isn't part of the client area, so the headless Skia renders before and after are identical and not attached. The icon renders above stand in for them.

Tests

  • LinuxTelHandlerRegistrationTests: three new tests, written first and failing before the fix: the entry names the icon beside the executable, escapes a backslash in that path, and carries StartupWMClass.
  • make clean ci is green, and zizmor reports nothing.
  • Tested by hand on GNOME (Wayland/XWayland): the installed .deb shows the icon in the app grid, dock and Alt-Tab, and the window now has a 128×128 _NET_WM_ICON.
  • Not tested yet: the .dmg and the MSI. The .dmg leg doesn't run on pull requests, so a manual run of the release workflow on this branch would cover both.

🤖 Generated with Claude Code

On GNOME the app showed a generic icon: there was no icon asset at all, so
neither desktop entry named one and no window set one. Windows and macOS
had none either.

The master is src/Freizeichen.App/Assets/icon.svg, a handset sounding its
dial tone on Lagebuch's tile in its signal-red/amber. `make icon` renders
the committed icon-1024.png and icon.ico from it, as the macOS and Windows
runners have no SVG renderer.

- Linux: the .deb installs the icon into hicolor (every declared size plus
  scalable), its entry gains Icon= and StartupWMClass=, and it depends on
  hicolor-icon-theme. The entry "Als Standard festlegen" writes points at
  the freizeichen.svg published beside the executable.
- Windows: the exe embeds icon.ico; the MSI uses it for the shortcut and
  the Installed apps entry.
- macOS: the .dmg builds Freizeichen.icns and names it in Info.plist.
- Both windows carry the icon.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com>
The icon path tests failed on the Windows runner: Path.GetDirectoryName
and Path.Join follow the host's rules, so /opt/freizeichen/Freizeichen
became \opt\freizeichen\freizeichen.svg there, and a backslash in a
Linux path was read as a separator. The entry always holds a Linux path,
so split it on '/' instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com>
@DeepDiver1975
DeepDiver1975 merged commit aafbcb3 into main Oct 27, 2026
9 checks passed
@DeepDiver1975
DeepDiver1975 deleted the fix/app-icon branch October 27, 2026 22:40
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