-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Fix scaling not working after resizing the window #699
Conversation
Scaling didn't work after resizing the window. In Godot 4, the SubViewport also has a size changed signal which should be used instead.
Co-authored-by: Aaron Franke <[email protected]>
Co-authored-by: Aaron Franke <[email protected]>
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.
Looks good. I'll squash-and-merge this.
In the future, some suggestions:
|
Thanks! |
Thank you for the help and information. I didn't know what squashing means, but a quick google search later and I'm up to date. |
Scaling didn't work after resizing the window. In Godot 4, the
SubViewport also has a size changed signal which should be used instead.
This fixes the issue I was having: #698
Tested this in the demo project and my personal project, everything seems to work find again.
The main changes were switching the stretch mode to the new Godot 4 mode Canvas_items like @Calinou suggested. And the viewport change should happen on the SubViewport _size_changed as that one updates later compared to the root viewport, which had more control over the size of the SubViewport for some reason.
Ps.: This is my first pull request ever so I'm not sure if I did a good job explaining everything.