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