Fix for the irksome, 'Details' sizing bug. Or at least a patch on a hornet's

nest.  Thanks to jill@emeraldgate.com for tracking this one (and the previous
StatusBar patch too).

There's more work here if someone wants it..  :-)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15990 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Ron Lee
2002-07-01 10:27:29 +00:00
parent 893f25f232
commit 801225c191
3 changed files with 71 additions and 8 deletions

View File

@@ -764,6 +764,15 @@ wxLogDialog::wxLogDialog(wxWindow *parent,
SetSizer(sizerTop);
// see comments in OnDetails()
//
// Note: Doing this, this way, triggered a nasty bug in
// wxTopLevelWindowGTK::GtkOnSize which took -1 literally once
// either of maxWidth or maxHeight was set. This symptom has been
// fixed there, but it is a problem that remains as long as we allow
// unchecked access to the internal size members. We really need to
// encapuslate window sizes more cleanly and make it clear when -1 will
// be substituted and when it will not.
wxSize size = sizerTop->Fit(this);
m_maxHeight = size.y;
SetSizeHints(size.x, size.y, m_maxWidth, m_maxHeight);
@@ -1015,6 +1024,7 @@ void wxLogDialog::OnDetails(wxCommandEvent& WXUNUSED(event))
// we have to reset min size constraints or Fit() would never reduce the
// dialog size when collapsing it and we have to reset max constraint
// because it wouldn't expand it otherwise
m_minHeight =
m_maxHeight = -1;
@@ -1146,3 +1156,4 @@ void wxLogTextCtrl::DoLogString(const wxChar *szString, time_t WXUNUSED(t))
#endif // wxUSE_TEXTCTRL
// vi:sts=4:sw=4:et