-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Add minimum / maximum window size project setting #80337
Conversation
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.
Tested locally on Linux/Fedora KDE X11 (rebased on top of master
16a9356):
- Maximum size project settings work as expected, even if the project's base window size or size override is greater than the maximum size (in this case, the size is clamped automatically, which is expected).
- However, minimum size project settings don't appear to override the default of
(64, 64)
when changed.
Testing project: test_pr_80337.zip
@Calinou Strange, it seems to be working for me. Screencast.from.2023-08-07.13-59-49.webmI've noticed strange behavior - sometimes you need to restart the game several times for the newly updated project settings to take effect, maybe you've come across this while testing? This can happen with any setting. |
Yes; I've done that 3 times to ensure the updated project settings are read by the running project. |
I have updated the code, here's the complete logic (with width taken as an example):
I don't know what could be causing the issue Calinou was having. I just realized I probably don't need to use |
Does this PR require more help/testing to move it forward? Would be great to have this QoL feature in 4.3 |
I've tested the PR again and minimum size works now. However, it turns out it was never an issue with this PR. This was because I enforced a minimum size override in KWin's application-specific overrides, and it affected all Godot projects: The only remaining concern I have is that behavior is unexpected if the minimum size is greater than the maximum size. In this case, you can freely resize the window above the minimum size, but I'd expect to be unable to resize the window at all in this case (with the window size being equal to the maximum size). It may also be worth printing a warning in this situation. |
I would more than willing to help this get through if @reptofrog is not available. |
I would appreciate that if you could finish it up as I am a little busy at the moment. 🙂 |
Would it be fine to create a new pull request to replace this existing one? |
Yes, feel free to open a pull request 🙂 Please rebase against the latest |
|
This adds
Window Minimum Width
,Window Minimum Height
,Window Maximum Width
,Window Maximum Height
to project settings. (underAdvanced Settings
)This is my first "proper" pull request, so I apologize if there is something wrong with logic or the style of code.
Notes:
Closes: #31303