Use content scale factor to make wxHTML DPI-aware

This commit is contained in:
JulianSmart
2015-11-29 19:36:14 +00:00
parent 78fe0ac3d8
commit c3ae2fc54a

View File

@@ -485,7 +485,12 @@ bool wxHtmlWindow::DoSetPage(const wxString& source)
SetBackgroundColour(wxColour(0xFF, 0xFF, 0xFF)); SetBackgroundColour(wxColour(0xFF, 0xFF, 0xFF));
SetBackgroundImage(wxNullBitmap); SetBackgroundImage(wxNullBitmap);
m_Parser->SetDC(&dc); double pixelScale = 1.0;
#ifndef wxHAVE_DPI_INDEPENDENT_PIXELS
pixelScale = GetContentScaleFactor();
#endif
m_Parser->SetDC(&dc, pixelScale, 1.0);
// notice that it's important to set m_Cell to NULL here before calling // notice that it's important to set m_Cell to NULL here before calling
// Parse() below, even if it will be overwritten by its return value as // Parse() below, even if it will be overwritten by its return value as