Skip to content

Linux: tray icon is a fixed-color icon and does not follow the panel light/dark theme #1947

Closed

Description

@fnune

Description

On Linux (KDE Plasma 6 Wayland) the tray icon stays dark on a dark panel, so it is hard to see. The package ships only full-color apps/Cap.png icons with no monochrome or -symbolic variant, so the tray host has nothing to recolor. Would a symbolic/monochrome tray icon be possible, so the panel can theme it?

Image

Reproduction

  1. KDE Plasma 6 with a dark panel theme.
  2. Run Cap so the tray icon appears.
  3. The icon stays dark regardless of the panel theme.

Additional Context

  • Cap version: 0.5.2
  • OS: CachyOS (Arch), KDE Plasma 6 / KWin Wayland
  • libayatana-appindicator 0.5.94

Activity

  1. linear commented on Jun 27, 2026

    @linear
  2. tembo commented on Jun 27, 2026

    @tembo

    The tray icon code lives in apps/desktop/src-tauri/src/tray.rs, with icons stored in apps/desktop/src-tauri/icons/tray-*.png.

    This is closely related to the macOS fix in PR #1579, which converted the tray icons to monochrome PNGs and used the macOS template icon API (set_icon_as_template(true)) to let the system adapt colors automatically. That approach works for macOS because the template API inverts monochrome icons based on menu bar appearance.

    For Linux with libayatana-appindicator, the theming mechanism is different. Desktop environments like KDE Plasma and GNOME expect symbolic icons — typically SVGs with a -symbolic.svg suffix installed to standard icon theme paths (e.g., /usr/share/icons/hicolor/scalable/status/). The panel then recolors these based on the current theme. Tauri's tray-icon crate on Linux doesn't have an equivalent to icon_as_template; instead, applications either:

    1. Ship symbolic SVG icons and set them by name (not by embedded bytes), letting the system locate and theme them
    2. Provide both light and dark icon variants and switch based on detected theme
    3. Use a high-contrast monochrome icon that works on both backgrounds

    Option 1 aligns with how most native Linux apps handle this. It would require adding SVG symbolic icons to the build/packaging and using TrayIconBuilder::with_icon_name() instead of embedding PNG bytes on Linux.

    Related: #1553 is tracking Linux desktop support more broadly.

  3. richiemcilroy commented on Aug 3, 2026

    @richiemcilroy
    Member

    Fixed in current releases. Symbolic Linux tray icons (so.cap.desktop-tray-*-symbolic.svg) were added in b1f687c and are wired through linux_tray_icon_for_mode / set_linux_tray_icon in apps/desktop/src-tauri/src/tray.rs, which sets the icon theme path so the panel can recolor them. This landed after 0.5.2, so it is in 0.5.6 nightly and later. Please reopen if the icon still does not follow your panel theme on a current build. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions