glue-viz / glue

Linked Data Visualizations Across Multiple Files
http://glueviz.org
Other
721 stars 152 forks source link

Alternative layout to MDI area #837

Open astrofrog opened 8 years ago

astrofrog commented 8 years ago

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)

astrofrog commented 8 years ago

Maybe we can do something with QDockWidgets?

astrofrog commented 6 years ago

Here's some inspiration from Jupyter Lab:

flexible

astrofrog commented 6 years ago

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.

astrofrog commented 6 years ago

This package has an implementation of a similar UI:

https://github.com/nucleic/enaml/tree/master/enaml/qt/docking

(mentioned by @sccolbert on Gitter)