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:
@@ -647,7 +647,7 @@ void wxPropertyGridManager::SetId( wxWindowID winid )
|
||||
wxSize wxPropertyGridManager::DoGetBestSize() const
|
||||
{
|
||||
// Width: margin=15 + columns=2*40 + scroll bar
|
||||
return wxSize(15+2*40+wxSystemSettings::GetMetric(wxSYS_VSCROLL_X), 150);
|
||||
return wxSize(15+2*40+wxSystemSettings::GetMetric(wxSYS_VSCROLL_X, m_pPropGrid), 150);
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
|
||||
@@ -1711,8 +1711,8 @@ wxPoint wxPropertyGrid::GetGoodEditorDialogPosition( wxPGProperty* p,
|
||||
|
||||
ImprovedClientToScreen( &x, &y );
|
||||
|
||||
int sw = wxSystemSettings::GetMetric( ::wxSYS_SCREEN_X );
|
||||
int sh = wxSystemSettings::GetMetric( ::wxSYS_SCREEN_Y );
|
||||
int sw = wxSystemSettings::GetMetric( ::wxSYS_SCREEN_X, this );
|
||||
int sh = wxSystemSettings::GetMetric( ::wxSYS_SCREEN_Y, this );
|
||||
|
||||
int new_x;
|
||||
int new_y;
|
||||
|
||||
Reference in New Issue
Block a user