Automatically pick a good default size of pqProxyWidgetDialog
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
pqProxyWidgetDialog is used to automatically create dialogs for pqProxyWidget -- which is a autogenerated widget for a vtkSMProxy. We use pqProxyWidgetDialog in several locations e.g
-
"Edit Color Legend Properties" dialog
- Start ParaView
- Create "Wavelet" from "Sources" menu, hit "Apply"
- Click "Edit Color Map" from the toolbar and then click the "Edit color legend properties" button (http://www.kitware.com/blog/home/post/578)
- This dialog will popup
-
"Configure Writer" dialog
- Start ParaView
- Create "Wavelet" from "Sources" menu, hit "Apply"
- File | Save Data --- save as foo.vtk
- Configure Writer dialog will popup.
Dialog (1) is too short. We could easily make it longer, to avoid scroll bars, which would make it easier to use. However, doing that makes dialog (2) unnecessarily longer. The goal of this task is to fix pqProxyWidgetDialog to try to show the dialog with "optimal" length between a fixed minimum and maximum size based on the contents of the dialog. "Optimal" length is the minimum length needed to now show the vertical scroll bar. Of course, if optimal length is too small or too big, we will clamp it to a predermined min/max value.