Improve handling of non default DPI in wxHtmlWindow deawing code

This replaces the fix of f4dcac9f44 (Return wxFont adjusted to DPI in
wxHtmlWinParser::CreateCurrentFont(), 2020-11-25) adjusting the font
explicitly under MSW with a better fix, associating the correct window
(and hence DPI) with the device context used in OnPaint().

See #18564.
This commit is contained in:
Maarten Bent
2020-11-28 16:56:10 +01:00
committed by Vadim Zeitlin
parent ef9161861d
commit 39ca664053
2 changed files with 1 additions and 4 deletions

View File

@@ -1116,6 +1116,7 @@ void wxHtmlWindow::OnPaint(wxPaintEvent& WXUNUSED(event))
dc = &dcm;
}
dc->GetImpl()->SetWindow(this);
PrepareDC(*dc);
// Erase the background: for compatibility, we must generate the event to