Use DPI Aware wxGetSystemMetrics

If no wxWindow is known, use wxTheApp->GetTopWindow().
Also use a wxWindow for all wxSystemSettings::GetMetric calls.
This commit is contained in:
Maarten Bent
2018-07-22 14:16:51 +02:00
parent 04b99d54bd
commit f74d756ca5
37 changed files with 106 additions and 87 deletions

View File

@@ -1486,9 +1486,9 @@ wxSize wxListCtrl::MSWGetBestViewRect(int x, int y) const
const DWORD mswStyle = ::GetWindowLong(GetHwnd(), GWL_STYLE);
if ( mswStyle & WS_HSCROLL )
size.y += wxSystemSettings::GetMetric(wxSYS_HSCROLL_Y);
size.y += wxSystemSettings::GetMetric(wxSYS_HSCROLL_Y, m_parent);
if ( mswStyle & WS_VSCROLL )
size.x += wxSystemSettings::GetMetric(wxSYS_VSCROLL_X);
size.x += wxSystemSettings::GetMetric(wxSYS_VSCROLL_X, m_parent);
// OTOH we have to subtract the size of our borders because the base class
// public method already adds them, but ListView_ApproximateViewRect()