Skip to content

Paint dark symbolic tray icons in the bar foreground - #14661

Merged
omarchybot merged 2 commits into
quattrofrom
fix/issue-8159
Oct 31, 2026
Merged

omarchybot merged 2 commits into
quattrofrom
fix/issue-8159

Conversation

@omarchybot

Copy link
Copy Markdown
Collaborator

Symbolic tray icons with a dark fill are invisible on a dark bar. The tray recolours a -symbolic icon with MultiEffect { colorization: 1.0; colorizationColor: root.foreground }, but colorization multiplies the source's luminance by that colour rather than replacing it, so a dark source stays dark: Cryptomator's #222222 icon came out #1B1B1B against a #CACCCC foreground. Adwaita's symbolic fill is dark too (#2e3436), so this is not one odd app.

TrayIcon now fills a rectangle with the bar foreground and masks it by the icon, which is the approach the report proposed: the icon contributes only its shape, and the colour is always the foreground, following theme changes as before. The mask ramps over the icon's alpha (maskThresholdMin: 0.5, maskSpreadAtMin: 1.0) instead of using the default hard cutoff, which turns every anti-aliased edge pixel fully opaque and visibly fattens the icon. Non-symbolic icons take the untouched Image path as before. The comment on iconIsSymbolic no longer says symbolic fills are often near-white, since the dark ones are what this fixes.

tray-symbolic-icon-test.sh publishes a dark symbolic icon through the existing mock StatusNotifierItem, which now takes its icon name and theme path from the environment, renders the real Tray widget and grabs that icon. Every opaque pixel must be the foreground and a corner must stay transparent, so it fails both on the current code and on a mask that paints a solid square. It skips when the output is asleep, because a grab then never returns.

Reviewed by Claude Opus 5.5 and Codex Medium over three rounds; Codex's findings shaped the test, and its last round found nothing wrong.

Fixes #8159

MultiEffect's colorization multiplies the source's luminance by colorizationColor, so a symbolic icon with a dark fill (Adwaita's #2e3436, Cryptomator's #222222) stayed dark on a dark bar. Fill a rectangle with the foreground and mask it by the icon instead, so the icon's own colour is discarded. The mask ramps smoothly over the icon's alpha (threshold 0.5, spread 1.0) rather than the default hard cutoff, which turned every anti-aliased edge pixel opaque.

The mock tray item takes its icon from the environment so the new test can publish a dark symbolic icon through a real StatusNotifierItem. The test grabs the icon itself, checks every opaque pixel is the foreground and a corner stays transparent, and skips when the output is asleep, since a grab then never returns.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Codex Medium <noreply@openai.com>
@greptile-apps

greptile-apps Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; the latest test change addresses the previous finding.

Summary

Symbolic tray icons now use the bar foreground, regardless of their original fill color.

  • Tray.qml paints the foreground through the icon’s alpha, preserving soft edges.
  • The mock tray item accepts an icon name and theme path from the environment.
  • The test checks the foreground color, transparent corners, and partially transparent edges. The latest change addresses the previous review finding.

Reviews (2) · Last reviewed commit: "Check that a symbolic tray icon keeps so..." · Reviewed by Greptile

Comment thread test/shell.d/tray-symbolic-icon-test.sh Resolved
The mask ramps over the icon's alpha so anti-aliased edges stay partly transparent, but the test only looked at opaque pixels and one corner, so a hard cutoff that fattens the icon still passed. Require at least one partly transparent pixel in the grab.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@omarchybot omarchybot added verified Omarchy Triage has verified that this issue is ready for final review ready Good to merge labels Oct 16, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator Author

Reviewed again against current quattro (51bfd1d), which has moved a long way since this branch was cut, and verified on a worker VM built from the Omarchy ISO, with the branch merged onto quattro.

  • Reproduction: tray-symbolic-icon-test.sh fails on quattro with only the test files added (every opaque pixel #1B1B1B against a #CACCCC foreground) and passes with the fix. quattro's TrayIcon still uses the colorization this replaces, so the bug is still there.
  • Shape: the rendered 12px icon covers almost exactly what the source SVG does at that size (summed alpha 73.2 against 74.2), so the ramped mask neither fattens nor thins it.
  • Greptile's point was right: the test did not check edges, so a hard-cutoff mask would have passed. I pushed e35b595, which requires partly transparent edge pixels in the grab. With maskThresholdMin and maskSpreadAtMin removed, the test now fails on that assertion.
  • Suite: test/all on the worker has six failures, and quattro has the same six on that worker (ASCII width, logo animation, the da catalog, pre_remove, keepLoaded IPC, lock budget). Nothing new fails. CI is green.

Second opinion from Codex Medium, which found no defect. It agreed the change is proportionate and correct for colour, theme changes and non-symbolic icons, and that the test checks the render rather than the code. That agreement may not be independent. It also pointed out something nobody has exercised yet: an icon switching between symbolic and non-symbolic names. That is the existing bug #7290 and #15240 are about. This change neither fixes it nor makes it worse, as far as either model can tell from reading the code. Those two pull requests edit the line next to this one, so whichever lands second will need a small rebase.

This now waits on the maintainer.

@omarchybot

Copy link
Copy Markdown
Collaborator Author

Before and after, as asked. Both were captured from the real bar on a worker VM built from the Omarchy ISO (Tokyo Night, display scale 2). The tray shows a mock tray item using Adwaita's stock alarm-symbolic.svg, which is filled #2e3436, pinned beside the chevron. "Before" is current quattro (e74970e). "After" is this branch (e35b595) merged onto that same commit. The crop is the same in both.

Before, on quattro: the alarm clock next to the chevron is dark grey on the dark bar and barely visible
After, with this branch: the alarm clock is drawn in the bar's foreground colour, like the icons beside it

tray-symbolic-icon-test.sh still passes (3 of 3) with the branch merged onto current quattro. Tray.qml has not changed on quattro since the last verification. No code was changed on the branch.

One visible difference came up while capturing. If a -symbolic tray icon can't be resolved at all, Quickshell's image://icon/ provider returns an opaque checkerboard placeholder. quattro draws that placeholder as a dark checkerboard. This branch paints the icon's alpha in the foreground colour, so the same placeholder becomes a solid light square. Both versions keep showing the placeholder until the icon's URL changes, so this is not a new failure. It is the same broken icon in a different colour. Hiding it would need a way to tell the placeholder apart from a real icon, and QML can't see that difference: both load as Image.Ready.

Codex Medium and muse-wonder (via pi, thinking high) reviewed the captures, the placeholder behaviour and the diff at this head. Neither found anything blocking. That agreement may not be independent. Both suggested noting the placeholder difference, as above.

This waits on the maintainer.

@omarchybot
omarchybot merged commit b94447f into quattro Oct 31, 2026
2 checks passed
@emirb emirb added this to the 4.5 milestone Nov 5, 2026
berenddeboer pushed a commit to berenddeboer/omarchy that referenced this pull request Nov 6, 2026
* Paint symbolic tray icons in the bar foreground through their alpha

MultiEffect's colorization multiplies the source's luminance by colorizationColor, so a symbolic icon with a dark fill (Adwaita's #2e3436, Cryptomator's #222222) stayed dark on a dark bar. Fill a rectangle with the foreground and mask it by the icon instead, so the icon's own colour is discarded. The mask ramps smoothly over the icon's alpha (threshold 0.5, spread 1.0) rather than the default hard cutoff, which turned every anti-aliased edge pixel opaque.

The mock tray item takes its icon from the environment so the new test can publish a dark symbolic icon through a real StatusNotifierItem. The test grabs the icon itself, checks every opaque pixel is the foreground and a corner stays transparent, and skips when the output is asleep, since a grab then never returns.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Codex Medium <noreply@openai.com>

* Check that a symbolic tray icon keeps soft edges

The mask ramps over the icon's alpha so anti-aliased edges stay partly transparent, but the test only looked at opaque pixels and one corner, so a hard cutoff that fattens the icon still passed. Require at least one partly transparent pixel in the grab.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Omarchybot <317366263+omarchybot@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Codex Medium <noreply@openai.com>
(cherry picked from commit b94447f)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working ready Good to merge verified Omarchy Triage has verified that this issue is ready for final review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Symbolic tray icons with a dark fill render invisible: MultiEffect.colorization cannot lighten the source (Cryptomator)

2 participants