-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[iOS] Fix issue creating rectangle using Radius with a high value #11051
Conversation
8ea992c
to
4a77c38
Compare
void UpdateRadiusX() | ||
{ | ||
if (Element.Width > 0) | ||
Control.UpdateRadiusX(Element.RadiusX / Element.Width); | ||
var radiusX = ValidateRadius(Element.RadiusX / Element.WidthRequest); | ||
Control.UpdateRadiusX(radiusX); | ||
} | ||
|
||
void UpdateRadiusY() | ||
{ | ||
if (Element.Height > 0) | ||
Control.UpdateRadiusY(Element.RadiusY / Element.Height); | ||
var radiusY = ValidateRadius(Element.RadiusY / Element.HeightRequest); | ||
Control.UpdateRadiusY(radiusY); | ||
} |
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.
Should this be Height
/Width
or HeightRequest
/WidthRequest
?
What happens if I am in a stack panel with the width set to stretch, but specified a width of say 10? The radius might be incorrect then?
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.
This does result in a different outcome on Android - they still use Width
/Height
.
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.
I see Tizen uses the requests. Testing UWP now.
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.
Reviewed and now HeightRequest
and WidthRequest
is used everywhere to fix the inconsistent issue.
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.
@jsuarezruiz should we be using Width (actual layout size) or WidthRequest (what the user said, but could be anything and will usually be different when set to Expand?)
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.
This is a breaking change, but also leaves the others inconsistent.
Description of Change
Fix issue creating rectangle using Radius with a high value on iOS.
Issues Resolved
API Changes
None
Platforms Affected
Behavioral/Visual Changes
None
Before/After Screenshots
Testing Procedure
Launch Core Gallery and navigate to the issue 11033. If the Ellipse renders without problems, the tests has passed.
PR Checklist