fix(tray): advertise IconName only when the theme resolves it; 0.1.2 - #44
Merged
Conversation
emir-hasanbegovic
force-pushed
the
fix/tray-icon-name-fallback
branch
from
August 24, 2026 13:32
1ec0e37 to
2ebc47a
Compare
StatusNotifier hosts prefer IconName over IconPixmap, so a run without the hicolor icons installed (a source build, the AppImage) rendered GNOME's "..." missing-icon placeholder in the top bar even though fallback pixmaps were shipped. The item now advertises the reverse-DNS name only when the theme lookup succeeds, and IconPixmap carries the brand mark pre-rasterised at the two published sizes and compiled into dish_core, replacing both the hand-drawn stand-in glyph and the runtime QIcon rasterisation (whose device-pixel-ratio scaling shipped 44px frames for the 22px slot). The tooltip carries the same icon fields. Ships as 0.1.2 (CMakeLists, changelog, metainfo entry). Follow-up: tag 0.1.2 on the merge commit. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
emir-hasanbegovic
force-pushed
the
fix/tray-icon-name-fallback
branch
from
August 24, 2026 13:42
2ebc47a to
9f522a0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
On a machine where Dish's hicolor icons are not installed (a source build, the AppImage), the tray item in GNOME's top bar renders as the AppIndicator extension's "..." missing-icon placeholder instead of the app icon.
The StatusNotifierItem always advertised
IconName=com.tinkernorth.Dish, and SNI hosts preferIconNameoverIconPixmap— so when the theme lookup fails, the shipped pixmap fallback is never consulted and the host draws its placeholder (see gnome-shell-extension-appindicator#232).Fix
IconName(and the tooltip's icon name) is advertised only whenQIcon::hasThemeIconresolves it; otherwise it is empty, which makes hosts fall back toIconPixmap.IconPixmapnow carries the brand mark pre-rasterised at the two published sizes (22 and 48 px, rendered frompackaging/dish.svgwith Qt's own SVG renderer) and compiled intodish_coreviaresources/tray.qrc, withQ_INIT_RESOURCEanchoring the archive member for static-library consumers. This replaces both the hand-drawn stand-in glyph and the runtimeQIconrasterisation — so the pixmaps no longer depend on an installed theme, the Qt SVG plugin, or runtime painting, and the 22px slot no longer receives 44px frames from device-pixel-ratio scaling.sniIconName,sniTrayPixmaps,toSniPixmap) live insrc/source/tray/SniIcon.{h,cpp}, reachable from the test suite.Deleting the runtime painting also keeps the TSan leg clean by construction: PNG decoding spawns none of the Qt raster worker threads that
QPainterdoes, so no sanitizer suppression is needed.Verification
tests/test_tray_icon_fallback.cpp: name suppression both ways, the bundled pixmaps decoding at exactly 22/48 with visible ink and transparency (which also proves the resource registers from the static library in any consumer binary), network-byte-order ARGB encoding ofIconPixmap, and item/tooltip consistency before a theme probe.scripts/ci_local.sh): clang-format, action-pin lint, Debug and Release suites 1773/1773, qmllint, QML literal scanner, translations sync, full clang-tidy sweep, hardening flags — all green. ASan+UBSan suite 1773/1773; TSan suite green on everything CI runs (the only local failures are pre-existing thread-leak flakes against the machine's real keyring and Qt 6.9, in tests CI skips or passes).IconName=''andIconPixmapframes of exactly 22×22 and 48×48 carrying the brand mark, so the top bar shows the Dish logo instead of "...". An installed build still resolves the themed icon and behaves as before.🤖 Generated with Claude Code