MudCheckBox and MudRadio: Do not grey out when read-only (#9876)#9904
MudCheckBox and MudRadio: Do not grey out when read-only (#9876)#9904henon merged 7 commits intoMudBlazor:devfrom
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #9904 +/- ##
==========================================
+ Coverage 89.82% 90.82% +0.99%
==========================================
Files 412 412
Lines 11878 12868 +990
Branches 2364 2487 +123
==========================================
+ Hits 10670 11687 +1017
+ Misses 681 618 -63
- Partials 527 563 +36 ☔ View full report in Codecov by Sentry. |
|
Can you post before and after pic? |
|
@ingkor that feels as inconsistent as it did before to me. I would think the slightly shaded color of the MudSwitch is quite fitting and could be applied to the other controls. As now the color is the same as when active, so there is no distinction for the user if the Checkbox should be selectable or not. |
|
The hover attribute makes the difference. It doesn't react when it's being hovered in readonly now. However it might be interesting to use a slightly dimmed color (lighten variant). Imo this is 1 stepnin the right direction already. |
|
That does not work on mobile though. |
|
Wouldn't the issue be fixed if the custom color would override the read only color. That way if no custom color is set it would still have the preset read only color |
|
There was an existing bug in the logic that may cause an additional issue with the colors: #9524 (comment) |
|
So we could do the lighten variant when disabled? Or not? |
|
@ingkor Thanks for your work, Will wait for @Garderoben to weigh in |
Garderoben
left a comment
There was a problem hiding this comment.
Lets do it like this. Like @danielchalmers said this is a step in the right direction.
I'm just wondering if CheckBox/Radio/TextFields etc should maybe have the dimmed readonly color like switches does.
|
#hacktoberfest eligibility? :D |
Of course! Thanks for contributing in Hacktober. I'll merge once @danielchalmers approves as well. |
|
Thanks @ingkor ! |


Description
Fixes: #9876
Keep the color when MudCheckBox and MudRadio are ReadOnly
I made the condition to grey out MudCheckBox and MudRadio only apply when disabled.
How Has This Been Tested?
Visually (only class altered)
Type of Changes
Checklist
dev).