-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
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
Windows with (0,0) size should fit content #62
Comments
Could you clarify what you are reporting with code sample and a screenshot? At the time of first creating a window with (0,0) size the window should automatically readjust to content size by gathering the maximum content frame over the next frame or two. However note that if your code is using window size to size widgets then auto-fitting create a feedback loop, so every auto-fitting will slightly readjust the window size. |
Perhaps this is because my window has the ImGuiWindowFlags_NoResize flags indeed. |
Correct! It currently skips all resizing behaviors with ImGuiWindowFlags_NoResize. Perhaps I should add a separate flag to distinguish manual user resize from initial auto-fit resize. Would you like that? |
A flag is ok, but you should assert if size <= 0 or set this flag. |
I made it that (0,0) perform auto-sizing even on a window with NoResize flag. |
FYI I reorganised the Begin() functions which was full of traps (subtle ordering dependencies). It should be better and healthier now but there is the possibility that I've created bugs or changes of behavior related to window size. Let me know if you notice anything unusual. The changes are spread over many commits ending with this |
It's strange to get a window without any content with null size.
And I didn't find any method to adjust window size to fit his content !
The text was updated successfully, but these errors were encountered: