-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
MudSwitch: Change track color to improve visibility on dark theme #11077
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MudSwitch: Change track color to improve visibility on dark theme #11077
Conversation
|
How does using dark lighten look. Light mode feels a little too light with this change imo. Any thoughts on this @danielchalmers |
|
This PR could be connected to Highlighted elements in dark mode using Color.Dark should have a slightly lighter color created by @Yomodo. |
@Anu6is Voilà! With |
|
Hmmmm, not great. Thanks for checking |
|
I have also tried |
|
Yeah, I think I prefer this one. |
Thanks for the feedback. I have updated the PR with this new proposal. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #11077 +/- ##
=======================================
Coverage 91.05% 91.06%
=======================================
Files 429 429
Lines 13965 13999 +34
Branches 2698 2706 +8
=======================================
+ Hits 12716 12748 +32
Misses 646 646
- Partials 603 605 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Ýour screenshots are from docs, please note that docs and mudblazor itself have different dark themes. I dont know why the switch is using black here, was it changed? pretty sure it should use one of the action colors, example: |
With a default Blazor Web App and not from the docs. <div class="d-flex">
<MudSwitch @bind-Value="Basic_Switch1" />
<MudSwitch @bind-Value="Basic_Switch2" Color="Color.Primary" />
<MudSwitch @bind-Value="Basic_Switch3" Color="Color.Secondary" />
<MudSwitch T="bool" Disabled="true" />
</div>
<div class="d-flex mt-2">
<MudSwitch @bind-Value="Basic_Switch4" Color="Color.Success" UncheckedColor="Color.Error" />
<MudSwitch @bind-Value="Basic_Switch5" Color="Color.Primary" UncheckedColor="Color.Secondary" />
<MudSwitch @bind-Value="Basic_Switch6" Color="Color.Info" UncheckedColor="Color.Warning" />
<MudSwitch T="bool" Disabled="true" UncheckedColor="Color.Default" />
</div>
@code {
public bool Basic_Switch1 { get; set; } = false;
public bool Basic_Switch2 { get; set; } = true;
public bool Basic_Switch3 { get; set; } = true;
public bool Basic_Switch4 { get; set; } = false;
public bool Basic_Switch5 { get; set; } = true;
public bool Basic_Switch6 { get; set; } = true;
} |
|
B) Here is the result with C) Here is the result with @Garderoben What do you think? Which solution do you prefer ? The PR, B or C? Or none of them ? |
Now its looking way better! i vote for C @danielchalmers what about you? |
|
I agree with C as well. |
|
Thank you for your feedback. PR updated with C solution. Ready to update if @danielchalmers has a different opinion. |
|
danielchalmers
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great on both light and dark + more consistent with other inputs
|
Thank you! |












Description
In a dark theme, with a
MudSwitchwith no definedColor, the horizontal bar is not visible.How Has This Been Tested?
This has only been tested visually. Only one css properties have been modified.
Type of Changes
Checklist
dev).