-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Grid layout for windows #4550
Comments
I have a feeling this would fall under the non-goals:
But I'm not sure. In any case, egui_dock and egui_tiles are indeed the closest we have to that at the moment. |
Thanks for confirming! I see the official egui online demo includes a button for reorganising the currently open windows so they are redistributed evenly across the available space. Are there other "strategies" documented anywhere? |
The code run when you click on this button is this: egui/crates/egui_demo_lib/src/demo/demo_app_windows.rs Lines 309 to 311 in 942fe4a
egui/crates/egui/src/memory.rs Lines 842 to 848 in 942fe4a
So it just forgets the previous data about all the windows, and because they already look for empty space when determining their initial position, this has the effect of "organizing" them. Actually, there is also egui_dnd which allows you to reorder list items by dragging them, and includes some animations as they move to their new positions. It's still not the same as a flexible layout, though. I don't know if there is anything that gets closer, but you can look in https://github.com/emilk/egui/wiki/3rd-party-egui-crates |
I am not 100% convinced this currently achievable in egui: https://github.com/react-grid-layout/react-grid-layout
If it is, could you please point me to a demo/example code?
If not, are there plans to build something along these lines?
I am aware of https://github.com/Adanos020/egui_dock https://github.com/rerun-io/egui_tiles and rerun-io/egui_tiles#30 but they don't quite seem to support the react-grid-layout use case(s)
Thanks!
The text was updated successfully, but these errors were encountered: