]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/sizer.cpp
new control based view architecture
[wxWidgets.git] / src / common / sizer.cpp
index 0e9587b4512c41715e814957114e7920f401075c..4cee972c0065b5939a28edb1356d8ae43c5f1746 100644 (file)
 #include "wx/notebook.h"
 #include "wx/listimpl.cpp"
 
+#ifdef __WXMAC__
+#   include "wx/mac/uma.h"
+#endif
+
 //---------------------------------------------------------------------------
 
 IMPLEMENT_CLASS(wxSizerItem, wxObject)
@@ -641,6 +645,10 @@ wxSize wxSizer::GetMinWindowSize( wxWindow *window )
                    minSize.y+size.y-client_size.y );
 }
 
+// TODO on mac we need a function that determines how much free space this
+// min size contains, in order to make sure that we have 20 pixels of free
+// space around the controls
+
 // Return a window size that will fit within the screens dimensions
 wxSize wxSizer::FitSize( wxWindow *window )
 {
@@ -1555,15 +1563,11 @@ static void GetStaticBoxBorders( wxStaticBox *box,
 
     if ( extraTop == -1 )
     {
-        int verMaj, verMin;
-        (void) ::wxGetOsVersion(&verMaj, &verMin);
-
         // The minimal border used for the top. Later on the staticbox'
         // font height is added to this.
         extraTop = 0;
 
-        // Is the Mac OS version OS X Panther or higher?
-        if ( ((verMaj << 16) + verMin) >= 0x00100030 )
+        if ( UMAGetSystemVersion() >= 0x1030 /*Panther*/ )
         {
             // As indicated by the HIG, Panther needs an extra border of 11
             // pixels (otherwise overlapping occurs at the top). The "other"