Add wxWindow::GetDPI()

This is simpler to use than wxDisplay(window).GetPPI() which was used
instead of it so far in all ports and can be implemented more
efficiently for wxMSW.

Remove wxGetWinTLW, GetDPI already tries to get the top window.
This commit is contained in:
Maarten Bent
2019-08-20 22:23:11 +02:00
parent 70f0900799
commit 9c193e1774
5 changed files with 76 additions and 24 deletions

View File

@@ -2036,6 +2036,20 @@ public:
*/
virtual wxVisualAttributes GetDefaultAttributes() const;
/**
Return the DPI of the display used by this window.
The returned value can be different for different windows on systems
with support for per-monitor DPI values, such as Microsoft Windows 10.
If the DPI is not available, returns @c wxSize(0,0) object.
@see wxDisplay::GetPPI()
@since 3.1.3
*/
virtual wxSize GetDPI() const;
/**
Returns the font for this window.