← Back to team overview

kicad-developers team mailing list archive

UIpolicies.txt

 

Wayne,

Were you thinking this would be done programmatically at runtime?

Avoid defining initial dialog sizes if possible. Let the sizers do their
job. After the dialog is fit to the sizers, set the minimum size to the
current size to prevent the dialog controls from being obscured when
resizing the dialog. If the labels or text of the dialog controls are,
set or changed at run time. Rerun wxWindow::Fit() to allow the dialog to re-size and adjust for the new control widths. This can all be done after
the dialog is created but before it is shown or use class methods to
re-size the dialog as required. Reset the minimum size to the updated
dialog size.

I fear a minimum size is fraught with platform dependencies, some of which can only be known at runtime, due to font sizes, etc.

If to be done at runtime, and I feel this is the only sensible way, then maybe we need to start deriving all dialogs from our own common base class so we can take care of all these things in a common way.

Dick








Follow ups