Add wxDisplay::GetStdPPIValue() and GetStdPPI()

Provide public way to access the default platform DPI, which was
previously a constant private to src/common/wincmn.cpp.
This commit is contained in:
Vadim Zeitlin
2020-08-06 23:54:48 +02:00
parent 2256dac384
commit 52b25211c8
3 changed files with 52 additions and 13 deletions

View File

@@ -87,6 +87,21 @@ public:
// get the resolution of this monitor in pixels per inch
wxSize GetPPI() const;
// get the default resolution for displays on this platform
static int GetStdPPIValue()
{
#ifdef __WXOSX__
return 72;
#else
return 96;
#endif
}
static wxSize GetStdPPI()
{
return wxSize(GetStdPPIValue(), GetStdPPIValue());
}
// name may be empty
wxString GetName() const;