]> git.saurik.com Git - wxWidgets.git/commitdiff
using common GetContentScaleFactor throughout part 2/2
authorStefan Csomor <csomor@advancedconcepts.ch>
Wed, 19 Jun 2013 20:29:56 +0000 (20:29 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Wed, 19 Jun 2013 20:29:56 +0000 (20:29 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74256 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/osx/cocoa/nonownedwnd.mm
src/osx/cocoa/window.mm
src/osx/iphone/window.mm
src/osx/nonownedwnd_osx.cpp
src/osx/window_osx.cpp

index 3901a71c69475eca62ecd2e41845b8172ea49d83..030b1e6a23ca794f20300296232329ce0a8219c6 100644 (file)
@@ -1035,16 +1035,6 @@ void wxNonOwnedWindowCocoaImpl::WindowToScreen( int *x, int *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()
 {
     return [m_macWindow isKeyWindow];
index c76c1a858073cac78be240f43c1adb49bcfbe96a..3465cdbc408936b3962eb40019b03f132bda4555 100644 (file)
@@ -1703,6 +1703,17 @@ void wxWidgetCocoaImpl::SetVisibility( bool visible )
     [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
 // ----------------------------------------------------------------------------
index 79abdfa1b096d376fa562b7ff7a8fba1fcd30023..c9ac123d25bf2881e79a223dbdfd587da07337d9 100644 (file)
@@ -609,7 +609,7 @@ void wxWidgetIPhoneImpl::SetControlSize( wxWindowVariant variant )
 {
 }
 
-float wxWidgetIPhoneImpl::GetContentScaleFactor() const 
+double wxWidgetIPhoneImpl::GetContentScaleFactor() const 
 {
     if ( [m_osxView respondsToSelector:@selector(contentScaleFactor) ])
         return [m_osxView contentScaleFactor];
index 183fe42d7fab5b9388b8a7ce9ba71919708f4d6a..edcba5d9ce707e6f0cf838324b99f2177e7be9f7 100644 (file)
@@ -478,11 +478,6 @@ void wxNonOwnedWindow::DoGetClientSize( int *width, int *height ) const
        *height = h ;
 }
 
-double wxNonOwnedWindow::GetMagnificationFactor() const
-{
-    return m_nowpeer->GetMagnificationFactor();
-}
-
 void wxNonOwnedWindow::WindowWasPainted()
 {
     s_lastFlush = clock();
index 1a44f25e42241559e72326ac2891e751039000f0..e8ce2cfc67f36d79a2fd3d48b334f2648455596c 100644 (file)
@@ -877,13 +877,6 @@ void wxWindowMac::DoGetClientSize( int *x, int *y ) const
        *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)
 {
     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();
 }