Add feature to evenly distribute views

Problem: If a user wants to create a layout of views that are divisible by two, it’s quite simple to get an even distribution of these views using the split icons:
image
However, if the user wants a layout of say, three images, it’s quite onerous to do so. Also, there have been a handful of times where I’ve accidentally moved the dividing line between a “power of two” layout and it’s painful to get back to an even distribution again.

For example, here’s me trying to use the GUI to make a 1x3 layout of results:


I’m then left with either dragging the dividing lines back and forth to get close to an even distribution, or I’ve got to load up a Python shell and run a trace command in order to script this.

Proposed Feature:
Some functionality in ParaView that does one or more of the following:

  • Lets the user specify the relative width & height for each view in a layout,
  • Lets the user add a “dimension constraint” between two or more views to set one or more of their dimensions to be equal.
  • Lets the user select multiple contiguous views and distribute [horizontally | vertically] similar to PowerPoint.
  • Other?
2 Likes

A simpler idea would be as follows:

Add two new buttons next to the split buttons: distribute horizontally, distribute vertically.

When clicked, all views will be distributed in the wanted direction. Eg:

become:

Mathieu, good idea. https://gitlab.kitware.com/paraview/paraview/-/issues/20788.

And Greg, thanks for the “nudge”.

Is this feature available to use? I need to evenly distribute the windows!

It was added in https://gitlab.kitware.com/paraview/paraview/-/merge_requests/4719 and will be available in ParaView 5.12.0. It is available right now in the nightly builds available at www.paraview.org/download.

To use, Ctrl/right click on the Layout tab above the views and select the menu item named “Rearrange Views” and select an option.

3 Likes

Very cool!

Dear Cory, thanks for this feature. I wonder if there is a python command for this Equalize Views? It seems this command is not available to be traced in the ParaView GUI.
Thanks in advance.

@nicolas.vuaille any plans to expose in Python?

I have no plan to improve python support, but it is already available:

GetLayout().SMProxy.EqualizeViews()

Or for specfic direction:

GetLayout().SMProxy.EqualizeViews(paraview.modules.vtkRemotingViews.vtkSMViewLayoutProxy.HORIZONTAL)

I think it should be very easy to add that in simple.py