Move wxHAS_DPI_INDEPENDENT_PIXELS definition to wx/features.h

This is going to be used in wxBitmap code, where wx/window.h is not
included.
This commit is contained in:
Vadim Zeitlin
2022-01-06 18:53:48 +00:00
parent 2945278334
commit afe3d0ebae
2 changed files with 15 additions and 7 deletions

View File

@@ -111,5 +111,20 @@
// compiler, so this symbol exists purely for compatibility.
#define wxHAS_EVENT_BIND
/*
Some platforms use DPI-independent pixels, i.e. pixels actually scale with
DPI and a 100px-wide window has the same apparent size on the display in
normal and high (i.e. 2x, or 200% scaling) DPI, while others always use
physical pixels and a window must be 200px wide to have the same apparent
size in high DPI as in normal DPI.
*/
#if defined(__WXGTK3__) || defined(__WXMAC__)
#define wxHAS_DPI_INDEPENDENT_PIXELS
// This is an older synonym kept only for compatibility
#define wxHAVE_DPI_INDEPENDENT_PIXELS
#endif
#endif /* _WX_FEATURES_H_ */

View File

@@ -49,13 +49,6 @@
#define wxUSE_MENUS_NATIVE wxUSE_MENUS
#endif // __WXUNIVERSAL__/!__WXUNIVERSAL__
#if defined(__WXGTK3__) || defined(__WXMAC__)
#define wxHAS_DPI_INDEPENDENT_PIXELS
// This is an older synonym kept only for compatibility
#define wxHAVE_DPI_INDEPENDENT_PIXELS
#endif
// ----------------------------------------------------------------------------
// forward declarations
// ----------------------------------------------------------------------------