Remove popup corner rounding and shadow on iOS#1463
Remove popup corner rounding and shadow on iOS#1463TheCodeTraveler merged 7 commits intoCommunityToolkit:mainfrom
Conversation
|
CornerRadius is initialized when the screen is rotated, so I will correct it and upload it again. |
|
By adding the code below, the problem with rotation was also resolved. I will upload the source code again after verification. |
|
The verification videos before and after the correction are shown below. [Case : Corners right angles]
[Case : Corners rounded]
After modification, you can see that the curvature of the Popup's corners has not changed. |
|
Please check if this solution still works when showing multiple (or just 2) popups one after another. |
This PR has been completed, if you are seeing an issue can you please open a bug at: https://github.com/CommunityToolkit/Maui/issues/new/choose |
Thanks for the comment, I now see I put this in the wrong thread. |
In this PR, we will remove the rounded corners of the iOS version of Popup to make it look similar to Android and Windows.
Description of Change
In order to remove the rounded corners of the iOS version of Popup, I modified it as follows.
[src\CommunityToolkit.Maui.Core\Views\Popup\MauiPopup.macios.cs]
The code below will remove the rounded corners.
However, if you use only the above code, the default shadow of iOS Popup will be displayed, and it will look like the following.
Shadows are visible around the corners.
To remove this shadow, we will use the method suggested by @maonaoda.
You can remove the shadow using the above code.
One thing to note is that in order to round the corners of the Popup, you need to layout it as shown below.
The following are points to keep in mind when rounding the corners of Popup.
If the above layout is not applied, the rounded corners of the iOS version of Popup will be removed by default.
For reference, before the modification, Popup is displayed as below on iOS.
This is a breaking change as it applies to all users.
Linked Issues
PR Checklist
approved(bug) orChampioned(feature/proposal)mainat time of PRAdditional information
I tested it with the following layout.
Below are the verification results.
The following is the layout when the Popup content is not wrapped in a Border.
Below are the verification results.
You can see that if the Popup's content is not wrapped with a Border, the corners of the Popup will be at right angles, and if it is wrapped, the roundness of the corners of the Popup can be controlled by the StrokeShape of the Border.
It would be desirable to be able to control the roundness of Popup corners using Popup properties, but this would require significant modification for each platform. For this reason, we propose a method to avoid this by wrapping the Popup's content in a Border and controlling the roundness of the corners using the Border's StrokeShapre.
If possible, I would like you to consider the following discussion in this PR for free customization of Popup.
#1461