Skip to content

fix: Tailscale icon invisible on dark themes when connected#774

Draft
rylos wants to merge 1 commit into
noctalia-dev:mainfrom
rylos:fix/tailscale-icon-dark-theme
Draft

fix: Tailscale icon invisible on dark themes when connected#774
rylos wants to merge 1 commit into
noctalia-dev:mainfrom
rylos:fix/tailscale-icon-dark-theme

Conversation

@rylos
Copy link
Copy Markdown

@rylos rylos commented Apr 27, 2026

Problem

When Tailscale is connected, the bar widget icon becomes nearly invisible on dark themes.

The icon color for the connected state is set to Color.mOnPrimary (BarWidget.qml L54), which is the semantic color for text/icons rendered on top of a primary-colored background (e.g. filled buttons, badges).

However, the capsule background uses Style.capsuleColor, not Color.mPrimary. On dark themes this means a dark icon on a dark background — poor contrast and effectively invisible.

When Tailscale is disconnected, the icon correctly uses Color.mOnSurface and is clearly visible.

Fix

Simplified the icon color binding to use Color.mOnSurface consistently for both connected and disconnected states:

- color: {
-   if (mainInstance?.tailscaleRunning ?? false) return Color.mOnPrimary
-   return mouseArea.containsMouse ? Color.mOnHover : Color.mOnSurface
- }
+ color: mouseArea.containsMouse ? Color.mOnHover : Color.mOnSurface

This matches the color logic already used by the text elements (IP address, peer count) in the same widget.

Testing

Verified on Noctalia Shell 4.7.6 with niri 25.11 using a dark theme (Tokyo Night). The icon is now clearly visible in both connected and disconnected states.

Alternative

If the intent is to visually distinguish the connected state via color, the capsule background could be changed to Color.mPrimary when Tailscale is running — that would make Color.mOnPrimary correct for the icon. Happy to implement that approach instead if preferred.

The icon color when Tailscale is connected was set to Color.mOnPrimary,
which is intended for elements on a primary-colored background. Since the
bar capsule uses Style.capsuleColor (not Color.mPrimary), this resulted
in a dark icon on dark themes with poor contrast.

Changed to Color.mOnSurface which correctly adapts to the capsule
background color across all themes.
@spiros132
Copy link
Copy Markdown
Collaborator

Would you be able to also bump the version number?

@spiros132 spiros132 marked this pull request as draft May 1, 2026 09:17
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.

2 participants