Skip to content

fix: Keep double precision in GridLengthHelper - #25511

Merged
MartinZikmund merged 1 commit into
unoplatform:masterfrom
brunoapolinariodev:fix/gridlength-helper-double-precision
Nov 10, 2026
Merged

MartinZikmund merged 1 commit into
unoplatform:masterfrom
brunoapolinariodev:fix/gridlength-helper-double-precision

Conversation

@brunoapolinariodev

Copy link
Copy Markdown
Contributor

GitHub Issue: closes #25242

PR Type:

Bugfix

What changed?

GridLengthHelper.FromPixels and FromValueAndType cast the double argument to float before building the GridLength, losing precision. GridLength already stores a double, so the casts were removed, matching WinUI. Added unit tests that fail before the change and pass after.

PR Checklist

  • Added Runtime tests, UI tests, or a manual test s

 - Remove the (float) casts in FromPixels and FromValueAndType
 - Add unit tests covering Pixel and Star values

Addresses unoplatform#25242

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@CLAassistant

CLAassistant commented Oct 15, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@MartinZikmund

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
1 pipeline(s) were filtered out due to trigger conditions.

@nventive-devops

Copy link
Copy Markdown
Contributor

The build 244787 found UI Test snapshots differences: skia-linux-screenshots: 223, skia-windows-screenshots: 300

Details
  • skia-linux-screenshots: 223 changed over 2494

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • AppWindowTitleBar Properties.png
    • Basics.png-dark
    • Basics.png
    • BenchmarkDotNet.png-dark
    • BenchmarkDotNet.png
    • BitmapIcon_Foreground.png-dark
    • BitmapIcon_Foreground.png
    • ButtonClippingTestsControl.png-dark
    • ButtonClippingTestsControl.png
    • AppWindowTitleBar Properties.png-dark
    • AutomationProperties_StructureAndProps.png-dark
    • AutomationProperties_StructureAndProps.png
    • Buttons.png-dark
    • Buttons.png
    • CalendarView_Theming.png-dark
    • CalendarView_Theming.png
    • ClipboardTests.png-dark
    • CompositionPath.png-dark
    • CompositionPath.png
    • DamageRegion_ShadowChildShape.png-dark
  • skia-windows-screenshots: 300 changed over 2494

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • AnimatedVisualsTestbedPage.png-dark
    • AutomationProperties_AutomationId.png-dark
    • AutomationProperties_AutomationId.png
    • Border_CornerRadius_Binding.png-dark
    • Border_CornerRadius_Binding.png
    • Border_CornerRadius_BorderThickness.png-dark
    • Border_CornerRadius_BorderThickness.png
    • CalendarView_Theming.png-dark
    • CalendarView_Theming.png
    • CompositionPath.png-dark
    • CompositionPath.png
    • AnimatedBackVisualSourceSamplePage.png
    • CompositionNineGridBrush_Source_Changes.png-dark
    • CompositionNineGridBrush_Source_Changes.png
    • AnimatedVisualsTestbedPage.png
    • Basics.png-dark
    • Basics.png
    • BenchmarkDotNet.png
    • Buttons.png-dark
    • Buttons.png

@MartinZikmund
MartinZikmund merged commit 90397e4 into unoplatform:master Nov 10, 2026
45 of 48 checks passed
@welcome

welcome Bot commented Nov 10, 2026

Copy link
Copy Markdown

🎉 Congratulations on getting your very first pull request merged into Uno Platform! This is a huge milestone — you are now officially part of the community of contributors helping shape the future of cross-platform .NET development, and your code will reach developers and apps all over the world. 🌍

We are genuinely grateful for the time and care you put into this contribution. Every PR — big or small — makes Uno Platform better for everyone, and we hope this is the first of many. We cannot wait to see what you build next! 🚀

As a small thank-you, we would love to send you some swag so you can wear your contributor status with pride. And if you have any feedback or ideas on how we can make contributing to Uno Platform even better, please open a feedback issue — we truly value your perspective.

giphy
Welcome to the family, and merci beaucoup! 👋❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/automation Categorizes an issue or PR as relevant to project automation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GridLengthHelper.FromPixels and FromValueAndType truncate the value to float

4 participants