X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/010d343bb28bbfd7a702a3ac60be30d15e132ba3..d4b73b1b8e585418459362c9bf9173aa21da8c41:/src/cocoa/slider.mm?ds=sidebyside diff --git a/src/cocoa/slider.mm b/src/cocoa/slider.mm index 7e319e4844..a55468122f 100644 --- a/src/cocoa/slider.mm +++ b/src/cocoa/slider.mm @@ -9,13 +9,15 @@ // 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 +#import IMPLEMENT_DYNAMIC_CLASS(wxSlider, wxControl) BEGIN_EVENT_TABLE(wxSlider, wxSliderBase) @@ -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([[NSSlider alloc] initWithFrame: MakeDefaultNSRect(size)]); [m_cocoaNSView release]; if(m_parent) m_parent->CocoaAddChild(this); + SetInitialFrameRect(pos,size); + return true; }