Skip to content

Fix tooltip text color for napari#240

Open
Arbaaz123676 wants to merge 1 commit into
brainglobe:mainfrom
Arbaaz123676:fix-tooltip-color
Open

Fix tooltip text color for napari#240
Arbaaz123676 wants to merge 1 commit into
brainglobe:mainfrom
Arbaaz123676:fix-tooltip-color

Conversation

@Arbaaz123676
Copy link
Copy Markdown

Description

Fixes the issue where cursor tooltip text appears as dark text on a dark background in napari dark mode.

The problem was caused by a hardcoded stylesheet:

self._tooltip.setStyleSheet("color: black")

This prevented Qt/napari from adapting the tooltip text color according to the active theme.

Changes

Removed the hardcoded tooltip text color.

Result

Tooltips now correctly adapt to dark mode.

Fixes #215

@Arbaaz123676
Copy link
Copy Markdown
Author

Hi! @TimMonko @adamltyson I’ve opened a PR that removes the hardcoded tooltip text colour so it correctly adapts to napari’s theme. Please let me know if any changes are needed. Thanks!

@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 30, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.02%. Comparing base (ad2fc2f) to head (8504f38).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #240      +/-   ##
==========================================
- Coverage   97.03%   97.02%   -0.01%     
==========================================
  Files          14       14              
  Lines         640      639       -1     
==========================================
- Hits          621      620       -1     
  Misses         19       19              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

[BUG] Cursor text is dark text on dark

1 participant