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:
@@ -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())));
|
||||
|
Reference in New Issue
Block a user