-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Impl auto safe area padding #13047
Impl auto safe area padding #13047
Conversation
You can test this PR using the following package version. |
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.
LGTM
|
@kerams can you open an issue with minimal repro? I can take a look over weekend |
What does the pull request do?
Adds a new
TopLevel.AutoSafeAreaPadding
property settable on the top-level content (MainView) or top-level itself.When enabled, it automatically adds safe area paddings.
Normally, to see any effect, it also requires InsetsManager.DisplayEdgeToEdge to be enabled as well, so application content can be rendered behind the status bar.
It is enabled automatically on iOS though, and we need to add safe paddings automatically. Making overall Avalonia iOS experience better out of the box.
It's a behavioral change on mobile, since TopLevel.AutoSafeAreaPadding is enabled by default now. If not needed, TopLevel.AutoSafeAreaPadding can be disabled on the main view.
Also, this PR changes iOS InsetsManager.SafeAreaPadding behavior to match Android behavior, when SafeAreaPadding returns empty paddings, when DisplayEdgeToEdge is disabled.
Fixed issues
Fixes #12969