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

PAINTROID-418 Fullscreen mode should zoom to fit #1115

Conversation

Electronix1337
Copy link
Contributor

@Electronix1337 Electronix1337 commented Jun 7, 2022

After this ticket when user clicks fullscreen, the bitmap is maxed out as good as possible. Also fixed bug where the bitmap was not centered after exiting fullscreen mode. Also fixed bug of loading temporary image, as developer forgot to set the according bitmap width and height and those were always set to the default display ratios which messed up the perspective/zoom level.

https://jira.catrob.at/browse/PAINTROID-418

Your checklist for this pull request

Please review the contributing guidelines and wiki pages of this repository.

  • Include the name of the Jira ticket in the PR’s title
  • Include a summary of the changes plus the relevant context
  • Choose the proper base branch (develop)
  • Confirm that the changes follow the project’s coding guidelines
  • Verify that the changes generate no compiler or linter warnings
  • Perform a self-review of the changes
  • Verify to commit no other files than the intentionally changed ones
  • Include reasonable and readable tests verifying the added or changed behavior
  • Confirm that new and existing unit tests pass locally
  • Check that the commits’ message style matches the project’s guideline
  • Stick to the project’s gitflow workflow
  • Verify that your changes do not have any conflicts with the base branch
  • After the PR, verify that all CI checks have passed
  • Post a message in the #paintroid Slack channel and ask for a code reviewer

@Electronix1337 Electronix1337 force-pushed the PAINTROID-418_Fullscreen_mode_should_zoom_to_fit branch 2 times, most recently from 04b12bf to cebda6e Compare June 9, 2022 09:52
@Electronix1337 Electronix1337 force-pushed the PAINTROID-418_Fullscreen_mode_should_zoom_to_fit branch 2 times, most recently from 4306d9d to 698593a Compare June 22, 2022 07:39
Copy link
Contributor

@AneiMakovec AneiMakovec left a comment

Choose a reason for hiding this comment

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

ok, after entering fullscreen mode the canvas is resized to fit the width and height of the screen.

Made distinction between different display resolutions (ldpi, mdpi, hdpi, xhdpi, xxhdpi, xxxhdpi) to determine notfication/status bar height. Now when user clicks fullscreen, the bitmap is maxed out as good as possible. Sometimes the behaviour is not optimal, this mostly happens when bitmapheight > surfaceheight, then the scale is not always fully zoomed but I was not able to find a proper solution for this. Also fixed bug where the bitmap was not centered after exiting fullscreen mode, this happened due to the fact that the surfaceheight to determine the middle of the screen was still too small (actual screen size - top-/bottom bar).
@Electronix1337 Electronix1337 force-pushed the PAINTROID-418_Fullscreen_mode_should_zoom_to_fit branch from 698593a to d7fa5ed Compare July 1, 2022 09:46
@wslany wslany merged commit 378a2e8 into Catrobat:develop Jul 1, 2022
@wslany
Copy link
Member

wslany commented Jul 1, 2022

Thanks.

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.

3 participants