-
Notifications
You must be signed in to change notification settings - Fork 7
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
ForegroundScale is being parsed with the culture of the machine. #96
Comments
Not sure if it's a bug... Like on C# even if your language is other than English you can't specify @nickrandolph or @jeromelaban thoughts? |
@ADD-David-Antolin thanks for the report. Could you provide a binlog of your build? |
It does not make any sense that two programmers, one in the States and one in Spain have to be continually modifying the value just because the have different regional formats in their machines. It is bad for maintainability. I know UnoIcon is based in MauiIcon. They have done the same fix I propose in: dotnet/maui#11965 |
@Suriman will upload it. |
Indeed, if the issue is fixed upstream let's replicate the same fix for sure. Thanks for the lookup @ADD-David-Antolin! |
Current behavior
The value is parsed with the culture of the regional configuration of the machine.
Expected behavior
The value is parsed with invariant culture. So "0.65" is 65%.
How to reproduce it (as minimally and precisely as possible)
Assuming your regional configuration is
English - United States
(or another in which the symbol of the decimal separator is the dot).Create a new project with the Uno Visual Studio Extension.
In
base.props
checkUnoIcon
item hasForegroundScale="0.65"
.Launch Windows head, the icon should be seen properly in the taskbar.
4, Change machine regional configuration to
Spanish - Spain
.Sign out & sign back in for changes to apply machine wide.
Open the solution and rebuild the windows head.
Launch Windows head, the icon in the taskbar is a blank background.
In
base.props
changeForegroundScale
value to0,65
(with a comma).Rebuild the windows head.
Launch Windows head, the icon should be seen properly in the taskbar.
Environment
Nuget Package:
Package Version(s): 1.0.2
Affected platform(s):
Visual Studio:
Anything else we need to know?
I think the problem is located here. It should use the overload with
IFormatProvider
and passCultureInfo.InvariantCulture
.The text was updated successfully, but these errors were encountered: