X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9240613a8db744c649ac4ec07dbee51a90eedc9a..72c23f8e2944bf479f439ff14cf952f8985162fe:/src/common/wincmn.cpp?ds=sidebyside diff --git a/src/common/wincmn.cpp b/src/common/wincmn.cpp index e09ed57c34..7a1e6e8577 100644 --- a/src/common/wincmn.cpp +++ b/src/common/wincmn.cpp @@ -17,10 +17,6 @@ // headers // ---------------------------------------------------------------------------- -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) - #pragma implementation "windowbase.h" -#endif - // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" @@ -532,9 +528,9 @@ void wxWindowBase::Centre(int direction) // fits the window around the children void wxWindowBase::Fit() { - if ( GetChildren().GetCount() > 0 ) + if ( !GetChildren().empty() ) { - SetSize(GetBestSize()); + SetClientSize(GetBestSize()); } //else: do nothing if we have no children } @@ -583,7 +579,7 @@ wxSize wxWindowBase::DoGetBestSize() const if ( m_windowSizer ) { - best = m_windowSizer->GetMinSize(); + best = GetWindowSizeForVirtualSize(m_windowSizer->GetMinSize()); } #if wxUSE_CONSTRAINTS else if ( m_constraints ) @@ -2284,7 +2280,7 @@ void wxWindowBase::OnMiddleClick( wxMouseEvent& event ) wxMessageBox(wxString::Format( _T( - " wxWidgets Library (%s port)\nVersion %u.%u.%u%s%s, compiled at %s %s\n Copyright (c) 1995-2005 wxWidgets team" + " wxWidgets Library (%s port)\nVersion %d.%d.%d%s%s, compiled at %s %s\n Copyright (c) 1995-2005 wxWidgets team" ), port.c_str(), wxMAJOR_VERSION,