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

When using integer scaling, resizing the window to be smaller than content_scale_size (the original viewport size) will clip the contents. #81024

Closed
Jordyfel opened this issue Aug 26, 2023 · 3 comments · Fixed by #81176

Comments

@Jordyfel
Copy link
Contributor

Jordyfel commented Aug 26, 2023

Godot version

master

System information

Windows

Issue description

Follow-up to #81012 (review).

This causes contents of the viewport to be clipped out of the window, which is not desirable, and also causes a problem with the implemented Window.move_to_center() when used with embedded windows.

Steps to reproduce

Create a 2D scene, set the window stretch mode to canvas_items and stretch scale mode to integer in the project settings, and resize the window to be smaller than the original viewport size. Result demonstrated in linked comment.

Minimal reproduction project

In linked comment.

@Jordyfel
Copy link
Contributor Author

In my opinion, the reasonable solution is to force the window minimum size to be equal to content_scale_size while using integer scaling, since integer scaling is supposed to be used with small content sizes anyway.

@dalexeev
Copy link
Member

Perhaps we could note in the docs that with integer scaling it is recommended to set a minimum window size?

@Riteo
Copy link
Contributor

Riteo commented Aug 29, 2023

I'm not really sure on what would be the best approach but definitely a documentation change would help since this causes confusion either way.

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

Successfully merging a pull request may close this issue.

6 participants