Fix correct screen DPI and not hard-coded 72 in wxOSX

Don't hard-code screen DPI as 72, use the real number instead (which is now
returned correctly, after the last commit).

Closes #17615.
This commit is contained in:
David Vanderson
2016-08-08 14:03:12 +02:00
committed by Vadim Zeitlin
parent 49801e57f1
commit e2a846e182
2 changed files with 3 additions and 5 deletions

View File

@@ -585,8 +585,7 @@ bool wxMacPrinter::Print(wxWindow *parent, wxPrintout *printout, bool prompt)
return false;
}
// on the mac we have always pixels as addressing mode with 72 dpi
printout->SetPPIScreen(72, 72);
printout->SetPPIScreen(wxGetDisplayPPI());
PMResolution res;
PMPrinter printer;
@@ -764,10 +763,9 @@ void wxMacPrintPreview::DetermineScaling(void)
int screenWidth , screenHeight ;
wxDisplaySize( &screenWidth , &screenHeight ) ;
wxSize ppiScreen( 72 , 72 ) ;
wxSize ppiScreen = wxGetDisplayPPI();
wxSize ppiPrinter( 72 , 72 ) ;
// Note that with Leopard, screen dpi=72 is no longer a given
m_previewPrintout->SetPPIScreen( ppiScreen.x , ppiScreen.y ) ;
wxCoord w , h ;