Skip to content
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

Ensure that the top bar size is included in iOS layout calculations. #2839

Merged
merged 1 commit into from
Sep 17, 2024

Conversation

freakboy3742
Copy link
Member

@freakboy3742 freakboy3742 commented Sep 14, 2024

As part of the introduction of simple apps in #2649, the handling of containers on iOS was refactored to introduce NavigationContainer (which has a navigation bar) as distinct from RootContainer (which doesn't). However, this refactor inadvertently altered the calculation of the available height of the container in the NavigationContainer case to not include the height of the navigation bar itself. The mechansim to compute the top bar height was present - but due to inheritance, the top bar height wasn't subtracted from the container height.

This restores the use of top bar height in container calculations, and adds a testbed test to ensure that content fits in the available area in mobile layouts.

Fixes #2836.

PR Checklist:

  • All new features have been tested
  • All new features have been documented
  • I have read the CONTRIBUTING.md file
  • I will abide by the code of conduct

@mhsmith mhsmith merged commit bf07c67 into beeware:main Sep 17, 2024
38 checks passed
@freakboy3742 freakboy3742 deleted the ios-topbar branch September 17, 2024 12:53
@jlij
Copy link

jlij commented Sep 19, 2024

Hello, has this issue been fixed?
If resolved, how should I use it.

@mhsmith
Copy link
Member

mhsmith commented Sep 19, 2024

Yes, it was released in Toga 0.4.7. Make sure the Toga requirements in your pyproject.toml file either use this version, or a version range that includes it, and then run briefcase build ios -ur.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

iOS MainWindow layouts don't take navigation bar into account.
3 participants