X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2ec55dc0bee338e32aa0612b36328cc82b9e9194..afbfef69a3fafc1c8305ef0289a3d7ddc8c1aa01:/src/cocoa/slider.mm diff --git a/src/cocoa/slider.mm b/src/cocoa/slider.mm index 9b0cea9a5c..4b6c6f6a7a 100644 --- a/src/cocoa/slider.mm +++ b/src/cocoa/slider.mm @@ -9,8 +9,13 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#include "wx/app.h" -#include "wx/statline.h" +#include "wx/wxprec.h" +#if wxUSE_SLIDER + +#ifndef WX_PRECOMP + #include "wx/app.h" + #include "wx/slider.h" +#endif //WX_PRECOMP #import @@ -26,16 +31,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