X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/bfddb9239fcc64dec73eeac9ddc1805ca3904b62..42c37decc53971441199dfe4d8adf7fb842b2336:/src/cocoa/slider.mm diff --git a/src/cocoa/slider.mm b/src/cocoa/slider.mm index f239be1003..f2fdeb9a83 100644 --- a/src/cocoa/slider.mm +++ b/src/cocoa/slider.mm @@ -9,6 +9,9 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// +#include "wx/setup.h" +#if wxUSE_SLIDER + #include "wx/app.h" #include "wx/slider.h" @@ -26,16 +29,17 @@ 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; } wxSlider::~wxSlider() { - CocoaRemoveFromParent(); - SetNSView(NULL); } +#endif // wxUSE_SLIDER