]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/scrolbar.cpp
fixed unused var warning
[wxWidgets.git] / src / mac / carbon / scrolbar.cpp
index f6f9bc4cfc5aace39b6cbb397235e9e237fd7e11..5f268188b9e3e1e76f676d2aaa81f17098b718bf 100644 (file)
 
 #include "wx/wxprec.h"
 
+#include "wx/scrolbar.h"
+
 #ifndef WX_PRECOMP
     #include "wx/intl.h"
     #include "wx/log.h"
+    #include "wx/settings.h"
 #endif
 
-#include "wx/scrolbar.h"
 #include "wx/mac/uma.h"
 
 IMPLEMENT_DYNAMIC_CLASS(wxScrollBar, wxControl)
@@ -219,3 +221,23 @@ wxInt32 wxScrollBar::MacControlHit( WXEVENTHANDLERREF handler, WXEVENTREF mevent
 
     return noErr;
 }
+
+
+wxSize wxScrollBar::DoGetBestSize() const
+{
+    int w = 100;
+    int h = 100;
+
+    if ( IsVertical() )
+    {
+        w = wxSystemSettings::GetMetric(wxSYS_VSCROLL_X);
+    }
+    else
+    {
+        h = wxSystemSettings::GetMetric(wxSYS_HSCROLL_Y);
+    }
+
+    wxSize best(w, h);
+    CacheBestSize(best);
+    return best;
+}