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

[ios] apply safe area insets to Kodi GUI #17234

Merged

Conversation

kambala-decapitator
Copy link
Contributor

Description

Extends RESOLUTION_INFO with guiInsets field that adds edge insets when computing GUI scaling in CGraphicContext::GetGUIScaling().

Motivation and Context

This is a better approach to making GUI not being obscured by device's notch originally introduced in #16719, because it still allows rendering video in full screen. Originally requested at https://forum.kodi.tv/showthread.php?tid=348671.

How Has This Been Tested?

Tested on iPhone XR (with notch) and iPhone 6+ / iPad Air 2 (without) and with external screen connected via HDMI adapter.

Screenshots:

1_framed
1force_landscapeleft_framed
2_framed
2force_landscapeleft_framed

Types of change

  • Bug fix (non-breaking change which fixes an issue)
  • Clean up (non-breaking change which removes non-working, unmaintained functionality)
  • Improvement (non-breaking change which improves existing functionality)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that will cause existing functionality to change)
  • Cosmetic change (non-breaking change that doesn't touch code)
  • None of the above (please explain below)

Checklist:

  • My code follows the Code Guidelines of this project
  • My change requires a change to the documentation, either Doxygen or wiki
  • I have updated the documentation accordingly
  • I have read the Contributing document
  • I have added tests to cover my change
  • All new and existing tests passed

@kambala-decapitator
Copy link
Contributor Author

jenkins build this please

1 similar comment
@kambala-decapitator
Copy link
Contributor Author

jenkins build this please

Copy link
Member

@ksooo ksooo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cannot runtime-test. Code looks good to me.

@kambala-decapitator
Copy link
Contributor Author

Jenkins build this please

instead of resizing native GL view, insets are applied to CGraphicContext::GetGUIScaling(): GUI isn't obscured by the notch while video plays in full screen
@phunkyfish
Copy link
Contributor

@kambala-decapitator is this ready to go in?

@phunkyfish phunkyfish added the PR Cleanup: Merge Candidate Candidate for merging after PR cleanup label Mar 10, 2020
@kambala-decapitator
Copy link
Contributor Author

@phunkyfish yes, just waiting for #17465 to be merged to have all lights green

@phunkyfish phunkyfish added PR Cleanup: Ready to Merge Can be merged and removed PR Cleanup: Merge Candidate Candidate for merging after PR cleanup labels Mar 10, 2020
@kambala-decapitator
Copy link
Contributor Author

Jenkins build this please

Maven85 pushed a commit to Maven85/kodi that referenced this pull request Mar 11, 2020
Maven85 pushed a commit to Maven85/kodi that referenced this pull request May 5, 2020
Maven85 pushed a commit to Maven85/kodi that referenced this pull request Aug 3, 2020
Maven85 pushed a commit to Maven85/kodi that referenced this pull request Aug 4, 2020
Maven85 pushed a commit to Maven85/kodi that referenced this pull request Aug 4, 2020
Maven85 pushed a commit to Maven85/kodi that referenced this pull request Aug 5, 2020
Maven85 pushed a commit to Maven85/kodi that referenced this pull request Aug 6, 2020
Maven85 pushed a commit to Maven85/kodi that referenced this pull request Aug 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants