Skip to content

Make the macOS menu bar icon a template image - #5528

Merged
Gabriel Dufresne (GabrielDuf) merged 1 commit into
mainfrom
fix/macos-menu-bar-icon-tone
Oct 16, 2026
Merged

Gabriel Dufresne (GabrielDuf) merged 1 commit into
mainfrom
fix/macos-menu-bar-icon-tone

Conversation

@mlandry-devolutions

@mlandry-devolutions Maxime Landry (mlandry-devolutions) commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor
  • I have read the contributing guidelines, and I agree with the Code of Conduct.
  • Have you checked that there aren't other open pull requests for the same changes?
  • Have you tested that the committed code can be executed without errors?
  • Have you confirmed that this issue is caused by UniGetUI itself, and not by the package manager or the package involved?

On macOS the tray icon variant (black or white) was picked from UniGetUI's own theme. With the app in Dark mode, the menu bar could show a white glyph on a light bar, next to black system icons. Following the system appearance is not enough either: on macOS 26 the menu bar tone comes from the wallpaper.

  • macOS: the tray icon is now a template image (MacOSProperties.SetIsTemplateIcon), so macOS tints it to match the menu bar, like its own icons. The status dot keeps its shape but loses its colour.
  • Linux: the icon follows the desktop appearance (PlatformSettings) and refreshes when it changes. The handler is removed on dispose.
  • Windows: unchanged, it still reads the taskbar theme from the registry.

Tested on macOS 26.7.1 with a light and a dark wallpaper: the icon is black, then white, without restarting.


Relates to UNI-35

🤖 Generated with Claude Code

…tch the menu bar

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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The focused platform-specific changes include subscription cleanup and have no identified blocking issues.

0 open findings

What changed in this PR

Improves tray icon visibility independently of UniGetUI’s app theme.

Changes:

  • Uses a macOS template icon for automatic menu bar tinting.
  • Makes Linux icons follow desktop appearance changes, with event cleanup on disposal.
  • Preserves Windows registry-based theme selection.
File Description
src/​UniGetUI.Avalonia/​Infrastructure/​TrayService.cs Updates platform-specific icon selection and appearance-change subscriptions.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@GabrielDuf
Gabriel Dufresne (GabrielDuf) merged commit db4273d into main Oct 16, 2026
6 checks passed
@GabrielDuf
Gabriel Dufresne (GabrielDuf) deleted the fix/macos-menu-bar-icon-tone branch October 16, 2026 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants