Add wxDisplay::GetPPI() to use instead of wxGetDisplayPPI()

While this is not done for all the ports yet, the new API allows
returning different PPI values for different monitors, unlike the old
(and still existing, but implemented in terms of the new one) global
function.
This commit is contained in:
Vadim Zeitlin
2018-10-06 23:21:45 +02:00
parent e3e883bbd2
commit ded2894b78
24 changed files with 290 additions and 107 deletions

View File

@@ -275,6 +275,11 @@ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size,
rc.x, rc.y, rc.width, rc.height)
));
sizer->Add(new wxStaticText(page, wxID_ANY, "Resolution: "));
const wxSize ppi = display.GetPPI();
sizer->Add(new wxStaticText(page, wxID_ANY,
wxString::Format("%d*%d", ppi.x, ppi.y)));
sizer->Add(new wxStaticText(page, wxID_ANY, "Depth: "));
sizer->Add(new wxStaticText(page, wxID_ANY,
wxString::Format("%d", display.GetDepth())));