-
Notifications
You must be signed in to change notification settings - Fork 32
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
ToggleSwitch has a strange MinWidth #1225
Comments
This affects the Figma Plugin release.This is actually an Uno issue and also affects the Fluent ToggleSwitch. The Repro in Playground: http://playground.platform.uno/#ccfdf8c8 Would the fix be removing the |
IMO that will solve the case. |
it is like that, because we inherited that style from winui directly: relevant issue: microsoft/microsoft-ui-xaml/issues/3652 |
On windows, it shows a label (on / off) and it is affected by localization. Here i receive Ligado / Desligado. |
can you check the layout constraints with TreeGraph and compare the result between windows vs one of our platforms? |
Hmm, it does affect Windows. But only for Fluent styles:
|
Tested the Material ToggleSwitch:Between Skia.GTK and UWP the only constraint that is different is the first one which is:
Apart from that other values for Actual also varies between GTK and UWP. You can see the whole TreeGraph comparassion here https://www.diffchecker.com/x1dQjV3U/. Skia is first UWP is second.
|
Can/Should we workaround this with a |
I agree with Erik. IMHO, I think we should override the native minWidth to force the control follow Material / Cupertino behaviors. All design systems will be fine. |
We can set |
Current behavior
Using a toggle switch inside an Autolayout with SpaceBetween uncovered that ToggleSwitch has a MinWidth set and it is causing alignment issues:
https://playground.platform.uno/#b80b413a
Expected behavior
The link above has a forced expected result using a MinWidth and the second result is the original and wrong one.
How to reproduce it (as minimally and precisely as possible)
Just use the provided link.
Environment
Nuget Package:
Package Version(s):
Affected platform(s):
Anything else we need to know?
The text was updated successfully, but these errors were encountered: