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:
committed by
Vadim Zeitlin
parent
49801e57f1
commit
e2a846e182
@@ -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).
|
||||
|
@@ -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 ;
|
||||
|
Reference in New Issue
Block a user