X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a9a4f2295344414e2ee4e3ec27fa5292918dff27..60372b0d54379701d62edf5595a7dc25c48330e1:/src/osx/iphone/window.mm diff --git a/src/osx/iphone/window.mm b/src/osx/iphone/window.mm index c9658b2951..be5bf2bc60 100644 --- a/src/osx/iphone/window.mm +++ b/src/osx/iphone/window.mm @@ -329,8 +329,8 @@ void wxOSXIPhoneClassAddWXMethods(Class c) IMPLEMENT_DYNAMIC_CLASS( wxWidgetIPhoneImpl , wxWidgetImpl ) -wxWidgetIPhoneImpl::wxWidgetIPhoneImpl( wxWindowMac* peer , WXWidget w, bool isRootControl ) : - wxWidgetImpl( peer, isRootControl ), m_osxView(w) +wxWidgetIPhoneImpl::wxWidgetIPhoneImpl( wxWindowMac* peer , WXWidget w, bool isRootControl, bool isUserPane ) : + wxWidgetImpl( peer, isRootControl, isUserPane ), m_osxView(w) { } @@ -595,7 +595,10 @@ void wxWidgetIPhoneImpl::SetControlSize( wxWindowVariant variant ) float wxWidgetIPhoneImpl::GetContentScaleFactor() const { - return [m_osxView contentScaleFactor]; + if ( [m_osxView respondsToSelector:@selector(contentScaleFactor) ]) + return [m_osxView contentScaleFactor]; + else + return 1.0; } void wxWidgetIPhoneImpl::SetFont( const wxFont & font , const wxColour& foreground , long windowStyle, bool ignoreBlack ) @@ -797,7 +800,7 @@ wxWidgetImpl* wxWidgetImpl::CreateUserPane( wxWindowMac* wxpeer, wxWindowMac* WX sv.clipsToBounds = YES; sv.contentMode = UIViewContentModeRedraw; sv.clearsContextBeforeDrawing = NO; - wxWidgetIPhoneImpl* c = new wxWidgetIPhoneImpl( wxpeer, v ); + wxWidgetIPhoneImpl* c = new wxWidgetIPhoneImpl( wxpeer, v, false, true ); return c; }