]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/sizer.cpp
implemented SetItemToolTip()
[wxWidgets.git] / src / common / sizer.cpp
index d52151ef33c4d03f4449f48ed480ff52c857b83f..894a190d7bdf496a3eb09c9c96b5ddc0c5e0419d 100644 (file)
     #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"
@@ -732,6 +732,15 @@ wxSize wxSizer::GetMinWindowSize( wxWindow *window )
 // 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 );