Window minimum size issues
It appears that when items/controls are hidden from connectwindow (to switch from register to login mode), the minimum size is still enforced and thus large unused area remains above the buttons.
It seems that a chain of
SetMinSize(wxSize(-1, -1));
SetMinSize(GetBestSize());
does not work, even though GetBestSize() documentation says that it returns max(GetrealBestSize(), GetMinSize());
A new approach is necessary.
PS: There are more dialogs that should have a minimum size set in a more dynamic way.