Add wxWindow::WXNotifyDPIChange() for wxOSX and wxGTK

This refactors the already existing code in wxOSX to make it available
in the common class and allow reusing it in wxGTK.

No changes yet.
This commit is contained in:
Vadim Zeitlin 2023-11-06 23:49:29 +01:00
parent e679e5d4c2
commit 6080dca576
5 changed files with 33 additions and 28 deletions

View file

@ -151,7 +151,6 @@ public:
// --------------
void OnMouseEvent( wxMouseEvent &event );
void OnDPIChanged( wxDPIChangedEvent& event );
void MacOnScroll( wxScrollEvent&event );

View file

@ -1675,6 +1675,10 @@ public:
#ifdef wxHAS_DPI_INDEPENDENT_PIXELS
// Return the DPI corresponding to the given scale factor.
static wxSize MakeDPIFromScaleFactor(double scaleFactor);
// Notify all non-top-level children of the given (typically top-level
// itself) window about the DPI change.
void WXNotifyDPIChange(double oldScaleFactor, double newScaleFactor);
#endif // wxHAS_DPI_INDEPENDENT_PIXELS
protected: