using common GetContentScaleFactor throughout part 2/2
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74256 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1035,16 +1035,6 @@ void wxNonOwnedWindowCocoaImpl::WindowToScreen( int *x, int *y )
|
|||||||
*y = p.y;
|
*y = p.y;
|
||||||
}
|
}
|
||||||
|
|
||||||
double wxNonOwnedWindowCocoaImpl::GetMagnificationFactor() const
|
|
||||||
{
|
|
||||||
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7
|
|
||||||
if ( [ m_macWindow respondsToSelector:@selector(backingScaleFactor) ] )
|
|
||||||
return [m_macWindow backingScaleFactor];
|
|
||||||
else
|
|
||||||
#endif
|
|
||||||
return 1.0;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool wxNonOwnedWindowCocoaImpl::IsActive()
|
bool wxNonOwnedWindowCocoaImpl::IsActive()
|
||||||
{
|
{
|
||||||
return [m_macWindow isKeyWindow];
|
return [m_macWindow isKeyWindow];
|
||||||
|
@@ -1703,6 +1703,17 @@ void wxWidgetCocoaImpl::SetVisibility( bool visible )
|
|||||||
[m_osxView setHidden:(visible ? NO:YES)];
|
[m_osxView setHidden:(visible ? NO:YES)];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
double wxWidgetCocoaImpl::GetContentScaleFactor() const
|
||||||
|
{
|
||||||
|
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7
|
||||||
|
NSWindow* tlw = [m_osxView window];
|
||||||
|
if ( [ tlw respondsToSelector:@selector(backingScaleFactor) ] )
|
||||||
|
return [tlw backingScaleFactor];
|
||||||
|
else
|
||||||
|
#endif
|
||||||
|
return 1.0;
|
||||||
|
}
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// window animation stuff
|
// window animation stuff
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
@@ -609,7 +609,7 @@ void wxWidgetIPhoneImpl::SetControlSize( wxWindowVariant variant )
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
float wxWidgetIPhoneImpl::GetContentScaleFactor() const
|
double wxWidgetIPhoneImpl::GetContentScaleFactor() const
|
||||||
{
|
{
|
||||||
if ( [m_osxView respondsToSelector:@selector(contentScaleFactor) ])
|
if ( [m_osxView respondsToSelector:@selector(contentScaleFactor) ])
|
||||||
return [m_osxView contentScaleFactor];
|
return [m_osxView contentScaleFactor];
|
||||||
|
@@ -478,11 +478,6 @@ void wxNonOwnedWindow::DoGetClientSize( int *width, int *height ) const
|
|||||||
*height = h ;
|
*height = h ;
|
||||||
}
|
}
|
||||||
|
|
||||||
double wxNonOwnedWindow::GetMagnificationFactor() const
|
|
||||||
{
|
|
||||||
return m_nowpeer->GetMagnificationFactor();
|
|
||||||
}
|
|
||||||
|
|
||||||
void wxNonOwnedWindow::WindowWasPainted()
|
void wxNonOwnedWindow::WindowWasPainted()
|
||||||
{
|
{
|
||||||
s_lastFlush = clock();
|
s_lastFlush = clock();
|
||||||
|
@@ -877,13 +877,6 @@ void wxWindowMac::DoGetClientSize( int *x, int *y ) const
|
|||||||
*y = hh;
|
*y = hh;
|
||||||
}
|
}
|
||||||
|
|
||||||
double wxWindowMac::GetMagnificationFactor() const
|
|
||||||
{
|
|
||||||
wxNonOwnedWindow* tlw = MacGetTopLevelWindow() ;
|
|
||||||
wxCHECK_MSG( tlw , 1.0, wxT("TopLevel Window missing") ) ;
|
|
||||||
return tlw->GetMagnificationFactor();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool wxWindowMac::SetCursor(const wxCursor& cursor)
|
bool wxWindowMac::SetCursor(const wxCursor& cursor)
|
||||||
{
|
{
|
||||||
if (m_cursor.IsSameAs(cursor))
|
if (m_cursor.IsSameAs(cursor))
|
||||||
@@ -1226,7 +1219,7 @@ void wxWindowMac::DoSetClientSize(int clientwidth, int clientheight)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
float wxWindowMac::GetContentScaleFactor() const
|
double wxWindowMac::GetContentScaleFactor() const
|
||||||
{
|
{
|
||||||
return GetPeer()->GetContentScaleFactor();
|
return GetPeer()->GetContentScaleFactor();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user