-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[Bug] Correct the transformation calculation of views #11933
Conversation
I may need help to see if this is actually UI testable... The scaling doesn't affect the bounds properties, so it is going to be a bit harder to check. |
BONUS: Fix the WPF rendering and also the iOS transform order... See screenshots :) |
I did not test Tizen, GTK and macOS yet. However, macOS uses the same code as iOS and Tizen seems good, but the order might be off. @rookiejava are you able to confirm? GTK... not sure if it supports anything. |
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.
@mattleibow is writing Unit Tests
|
||
[Test, Category("Transformation"), TestCaseSource(nameof(TransformationCases))] | ||
[Description("View transformation should match renderer transformation")] | ||
public async Task TransformationConsistent(View view) |
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.
❤️
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 like it still needs a little bit more rounding love @mattleibow
I am rounding to 3 decimal places... Maybe the library has a bug or something? Maybe it is the nfloat or something. I'll check. |
I see lots more green, but still a bit of red... |
The iOS failure is not related. |
Another place were this actually shows up as what I think i an improvement is the "pinch gallery". Before, when you pinch, it would scale from the left edge. Afterwards, it scales from the center as expected. |
Description of Change
When the translation offset for a view is calculated, it incorrectly uses the scale to multiply/divide the actual offset. Side bug, seems WPF does not scale at all.
This PR will correct the math, I hope.
Issues Resolved
API Changes
None
Platforms Affected
Behavioral/Visual Changes
None
Before/After Screenshots
Not applicable
Testing Procedure
PR Checklist