Skip to content

fix: Use faint color for disabled on-state toggle switch#325

Merged
tlambert03 merged 1 commit intopyapp-kit:mainfrom
hanjinliu:toggle-switch-color
Feb 3, 2026
Merged

fix: Use faint color for disabled on-state toggle switch#325
tlambert03 merged 1 commit intopyapp-kit:mainfrom
hanjinliu:toggle-switch-color

Conversation

@hanjinliu
Copy link
Contributor

In the current implementation, we use the same toggle swtich groove color for enabled+off, disabled+on and disabled+off. This makes the check state unclear when the widget is disabled.

In this PR, on-color and off-color are mixed so it is visually easier to find the on-state switches, and they do not stand out too much.

Examples of enabled vs disabled toggle switches:

image

@codecov
Copy link

codecov bot commented Jan 30, 2026

Codecov Report

❌ Patch coverage is 37.50000% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.37%. Comparing base (cd67217) to head (345de6a).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
src/superqt/switch/_toggle_switch.py 37.50% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #325      +/-   ##
==========================================
+ Coverage   86.35%   86.37%   +0.02%     
==========================================
  Files          49       49              
  Lines        3862     3868       +6     
==========================================
+ Hits         3335     3341       +6     
  Misses        527      527              

☔ 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.

Copy link
Member

@tlambert03 tlambert03 left a comment

Choose a reason for hiding this comment

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

Fine by me! Thanks

Copy link
Member

@tlambert03 tlambert03 left a comment

Choose a reason for hiding this comment

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

Fine by me! Thanks

@tlambert03 tlambert03 merged commit 8d6dc33 into pyapp-kit:main Feb 3, 2026
28 of 30 checks passed
@tlambert03 tlambert03 added the bug Something isn't working label Feb 3, 2026
@tlambert03 tlambert03 changed the title Use faint color for disabled on-state toggle switch fix: Use faint color for disabled on-state toggle switch Feb 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Development

Successfully merging this pull request may close these issues.

2 participants