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

Correctly enforce minimum window size in editor #85887

Merged
merged 1 commit into from
Dec 20, 2023

Conversation

YuriSizov
Copy link
Contributor

Calling Window's size methods this early doesn't sync the values with the DisplayServer because the main window doesn't have a valid ID yet. So we have to do the sync manually, otherwise the minimum size is not actually enforced.

As an extra usability improvement, and the reason why I noticed this issue, I added the upper cap on the language picker popup in the project manager. By default it just takes as much space as possible, which doesn't seem very usable to me. I made it to cap the size at half the screen resolution, but no less than the minimum window size. The result:

image


I refactored the PM's code related to this a bit and removed some bits which I think we no longer need.

@YuriSizov YuriSizov added bug enhancement topic:editor usability topic:gui cherrypick:4.2 Considered for cherry-picking into a future 4.2.x release labels Dec 7, 2023
@YuriSizov YuriSizov added this to the 4.3 milestone Dec 7, 2023
@YuriSizov
Copy link
Contributor Author

Also, this PR makes the project manager a bit bigger by default, matching the minimum size of the editor (so it should not make things worse for smaller screens). But the minimum allowed size of the project manager is still smaller.

Also set the maximum size for the language
picked in the project manager.
@YuriSizov YuriSizov merged commit aae58cd into godotengine:master Dec 20, 2023
15 checks passed
@YuriSizov
Copy link
Contributor Author

Thanks for reviews!

@YuriSizov YuriSizov deleted the editor-enforce-min-window branch December 20, 2023 14:17
@YuriSizov YuriSizov removed the cherrypick:4.2 Considered for cherry-picking into a future 4.2.x release label Jan 25, 2024
@YuriSizov
Copy link
Contributor Author

Cherry-picked for 4.2.2.

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

Successfully merging this pull request may close these issues.

2 participants