#include "wx/string.h"
#include "wx/intl.h"
#include "wx/math.h"
+ #include "wx/utils.h"
#endif // WX_PRECOMP
#include "wx/sizer.h"
-#include "wx/utils.h"
#include "wx/statbox.h"
#include "wx/settings.h"
#include "wx/listimpl.cpp"
// Return a window size that will fit within the screens dimensions
wxSize wxSizer::FitSize( wxWindow *window )
{
+ if ( window->IsTopLevel() )
+ {
+ wxTopLevelWindow *tlw = wxDynamicCast(window, wxTopLevelWindow);
+ if ( tlw && tlw->IsAlwaysMaximized() )
+ {
+ return tlw->GetClientSize();
+ }
+ }
+
wxSize size = GetMinWindowSize( window );
wxSize sizeMax = GetMaxWindowSize( window );