Open astrofrog opened 8 years ago
Maybe we can do something with QDockWidgets?
Here's some inspiration from Jupyter Lab:
It might not be too hard to replicate what Jupyter Lab does - their UI is nice but all that happens during the click and drag is that a colored rectangle moves around. Doing the final layout might just require making a QSplitter widget at the location of the drop (or adding to an existing QSplitter).
I think we should maybe just develop this as a standalone mini-Qt package then use that in glue, as it could be useful for other projects.
This package has an implementation of a similar UI:
https://github.com/nucleic/enaml/tree/master/enaml/qt/docking
(mentioned by @sccolbert on Gitter)
It would be nice to explore other ways to organize the viewers in the main drawing area that are not based on the MDI area, because the latter doesn't play nice with OpenGL (it works, but is ugly). In addition, the default mode of completely free layout in the MDI area can result in some users' setup being pretty messy.
I'd like to explore the option of instead using nested horizontal and vertical layouts to guarantee that viewers can't overlap (and which would also allow us to not use the MDI area). I have some ideas on this, so I'll work on it in the near future. We could then have a toggle to switch between MDI area layout and a more strict layout.
(This is independent of @ChrisBeaumont's work In https://github.com/glue-viz/glue/pull/373 which is to tile the windows inside the MDI layout)