]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/scrolbar.cpp
Commented out call that breaks metal style setting before Create
[wxWidgets.git] / src / mac / carbon / scrolbar.cpp
index f6f9bc4cfc5aace39b6cbb397235e9e237fd7e11..92ed3abb33321a7324fc8b99bca546b73360b36c 100644 (file)
@@ -16,6 +16,7 @@
     #include "wx/log.h"
 #endif
 
+#include "wx/settings.h"
 #include "wx/scrolbar.h"
 #include "wx/mac/uma.h"
 
@@ -219,3 +220,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;  
+}