diff --git a/docs/changes.txt b/docs/changes.txt index 5a49e023ef..f08b98f8d5 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -120,7 +120,7 @@ wxMSW: wxOSX: - Fix handling of non-BMP characters in GetPartialTextExtents() (ARATA Mizuki). -- Implement wxGetDisplaySizeMM() correctly (David Vanderson). +- Implement wxGetDisplaySizeMM() and fix printing DPI (David Vanderson). - Remove extra borders around wxFilePickerCtrl (John Roberts). - Set up extensions filter correctly in wxFileDialog (nick863). - Turn off automatic quotes substitutions in wxTextCtrl (Xlord2). diff --git a/src/osx/core/printmac.cpp b/src/osx/core/printmac.cpp index b6c1eb625f..9bc7f7fccf 100644 --- a/src/osx/core/printmac.cpp +++ b/src/osx/core/printmac.cpp @@ -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 ;