Use DPI Aware wxSystemParametersInfo

Require a wxWindow when requesting GetNonClientMetrics.
If no wxWindow is known, use wxTheApp->GetTopWindow().
This commit is contained in:
Maarten Bent
2018-07-22 14:21:36 +02:00
parent c0c6a4b826
commit 0a79c48631
4 changed files with 15 additions and 8 deletions

View File

@@ -396,7 +396,8 @@ void wxMessageDialog::AdjustButtonLabels()
/* static */
wxFont wxMessageDialog::GetMessageFont()
{
const NONCLIENTMETRICS& ncm = wxMSWImpl::GetNonClientMetrics();
const wxWindow* win = wxTheApp ? wxTheApp->GetTopWindow() : NULL;
const NONCLIENTMETRICS& ncm = wxMSWImpl::GetNonClientMetrics(win);
return wxNativeFontInfo(ncm.lfMessageFont);
}