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

Clipping issue with resizable windows at max size #883

Closed
apessino opened this issue Nov 6, 2021 · 4 comments
Closed

Clipping issue with resizable windows at max size #883

apessino opened this issue Nov 6, 2021 · 4 comments
Labels
bug Something is broken duplicate This issue or pull request already exists

Comments

@apessino
Copy link

apessino commented Nov 6, 2021

Hello!

This seems like a potentially unintended behavior with window resizing. I took a quick video showing the issue:

egui_problem.mp4

It appears that the clipping area of the parent window is affected even if the window is not visibly resized. Regardless of the problem with the combo box this does not seem like an intended side effect of resizing.

Notice that in this case the problem is easily corrected by setting the window to not resizable, but since resizing is the default window setting and it is an issue with resizable windows that are at max size, then it should probably be investigated at some point.

Thanks!

A=

@apessino apessino added the bug Something is broken label Nov 6, 2021
@emilk emilk added the duplicate This issue or pull request already exists label Nov 7, 2021
@emilk
Copy link
Owner

emilk commented Nov 7, 2021

Duplicate of #825

@emilk emilk marked this as a duplicate of #825 Nov 7, 2021
@emilk emilk closed this as completed Nov 7, 2021
@apessino
Copy link
Author

apessino commented Nov 7, 2021

I did see that issue and it seemed like a different problem to me. In the case I was showing the drop down is not clipping unless you "resize" the window. Why is the parent clip rect changing if the window is not actually resized? It seems like a different and suspicious behavior to me. Then again, you know best and if you think it's all the same then OK. :)

Also, perhaps the window should not register as resizable to the user (edge highlighting/pointer change) unless there is an actual range for the window to resize to.

@emilk
Copy link
Owner

emilk commented Nov 7, 2021

Each resizable window has a desired size, which it may or may not fill. This occasionally creates some weird behavior, but it is a difficult problem to solve in immediate mode.

perhaps the window should not register as resizable to the user (edge highlighting/pointer change) unless there is an actual range for the window to resize to.

How can the window know whether or not there was a widget in it that respected the size preferences of the window? Again, limitations of immediate mode. So as a user you have to manually specify if your window should be resizable or not.

@apessino
Copy link
Author

apessino commented Nov 7, 2021

Fair point, it's easy to forget that you have minimal cached information to make sizing/interaction decisions. I guess the only way to keep everything automatic while avoiding artifacts would be to split processing into a layout and then a process/render pass, as you have mentioned before.

In the meantime managing the resizable flag on my end makes sense and it's easy to do - thanks!

A=

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is broken duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants