]> git.saurik.com Git - wxWidgets.git/blobdiff - src/cocoa/slider.mm
Use function table instead of direct references to GSocket functions.
[wxWidgets.git] / src / cocoa / slider.mm
index 7e319e48446b3da55c54278e32e1579ba1770bba..4b6c6f6a7a8eb1d39d0dfc5fb1293bd935d5eb47 100644 (file)
@@ -9,11 +9,13 @@
 // Licence:    wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
-#include "wx/setup.h"
+#include "wx/wxprec.h"
 #if wxUSE_SLIDER
 
-#include "wx/app.h"
-#include "wx/slider.h"
+#ifndef WX_PRECOMP
+    #include "wx/app.h"
+    #include "wx/slider.h"
+#endif //WX_PRECOMP
 
 #import <AppKit/NSView.h>
 
@@ -29,10 +31,12 @@ bool wxSlider::Create(wxWindow *parent, wxWindowID winid,
 {
     if(!CreateControl(parent,winid,pos,size,style,validator,name))
         return false;
-    SetNSView([[NSView alloc] initWithFrame: NSMakeRect(10,10,20,20)]);
+    SetNSView([[NSView alloc] initWithFrame: MakeDefaultNSRect(size)]);
     [m_cocoaNSView release];
     if(m_parent)
         m_parent->CocoaAddChild(this);
+    SetInitialFrameRect(pos,size);
+
     return true;
 }