fix: Tailscale icon invisible on dark themes when connected#774
Draft
rylos wants to merge 1 commit into
Draft
Conversation
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.
Collaborator
|
Would you be able to also bump the version number? |
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
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, notColor.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.mOnSurfaceand is clearly visible.Fix
Simplified the icon color binding to use
Color.mOnSurfaceconsistently for both connected and disconnected states: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.mPrimarywhen Tailscale is running — that would makeColor.mOnPrimarycorrect for the icon. Happy to implement that approach instead if preferred.