X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0f85d5e799ce87db7a5a5291bb258ee22e4ff256..e330eb461962fc89d1650d912a5a63eb2f0c02d3:/src/mac/carbon/scrolbar.cpp?ds=sidebyside

diff --git a/src/mac/carbon/scrolbar.cpp b/src/mac/carbon/scrolbar.cpp
index f6f9bc4cfc..5f268188b9 100644
--- a/src/mac/carbon/scrolbar.cpp
+++ b/src/mac/carbon/scrolbar.cpp
@@ -11,12 +11,14 @@
 
 #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;
+}