-
-
Notifications
You must be signed in to change notification settings - Fork 10.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
Added option for resize grip in the lower left corner of a window. #822
Conversation
May I ask why did you want it specifically in that corner?(To understand your use case. I wanted to add the possibility to resize from any corners and any border. Especially any-border is necessary when using e.g. docking types of facilities. For both things the problem is mostly a visual/rendering problem.
|
First, this is my first time using dear imgui, and so so far it's been exactly what I'm looking for. I currently have imgui windows docked on the upper left and upper right sides of my application. And I want to have the ability to resize those windows away from the sides and top of the application. Adding in a lower left grip seemed like an non-intrusive addition that matched the current style and layout of the windows. That being said, like you, I would prefer having the ability to resize from any corner or side of the window.
That way any combination of corners and sides could be enabled or disabled. I did see that you have If you don't like the flags approach and you want to go the style route, that could work as well. My bias is that in my use case, the resize style would not be global, but per window. I could definitely push and pop the style per window. Either way, I think it works. I'll take some time this weekend to prototype a solution, see how it turns out. Would you like me to keep committing and commenting to this pull request? Or would you rather me open a new pull request that is more specific to adding full resize functionality and can be used for testing, iterating, and commenting? |
This would be very useful for panel windows that are permanently docked at some edge of the window. Though flags should definitely be combinable as Any chance to see this merged? |
The four points I have highlighted still stand. The PR isn't mergeable as is but I agree we will need this feature. I suspect that the desirable answer will be that by default every window is resizable from all 4 corners and 4 border. This will probably have to wait until an official Docking extension is implemented. I'll keep 1) and 2) in mind as I am looking at styles at the moment. |
… any of the 4 corners (only 2 corners enabled). (#822)
…eFromAnySide is set. (#822) The interaction is currently unsatisfying because we can only reach a window from its inner rectangle (because of HoveredWindow filtering).
…olor. May need its own color. (#822)
… any of the 4 corners (only 2 corners enabled). (#822)
…eFromAnySide is set. (#822) The interaction is currently unsatisfying because we can only reach a window from its inner rectangle (because of HoveredWindow filtering).
…olor. May need its own color. (#822)
@amc522 @rokups However, two things: For the border your backend/binding needs to honor mouse cursor requests otherwise you won't have visual feedback on hovering borders.
I haven't got around to get all the backend to support mouse cursor and I think in the meanwhile this will stay a non-default flag. For resizing from the border it currently requires the mouse to be inside the window which is a little unsatisfactory. This should be improved. Closing this as the initial PR feature is supported. Added the point (2) in the todo list. |
Thank you so much for implementing this! Can't wait to try it out. |
The lower left grip is disabled by default and can be added to the window with one of the following two window flags
ImGuiWindowFlags_ResizeLowerLeft
ImGuiWindowFlags_ResizeLowerLeftAndRight