Add wxWindow::WXAdjustFontToOwnPPI()
Avoid calling GeTDPI() in font.WXAdjustToPPI(GetDPI()); invocations in common code on platforms that don't need any adjustment (i.e. anything other than MSW). This fixes wxOSX crashes when GetFont() is called too early during window creation, but is the right thing to do regardless. Closes https://github.com/wxWidgets/wxWidgets/pull/2036 Closes #18903.
This commit is contained in:
committed by
Vadim Zeitlin
parent
9e68df224f
commit
8efc6fb003
@@ -476,13 +476,6 @@ public:
|
||||
// account as well.
|
||||
static int GetNumericWeightOf(wxFontWeight weight);
|
||||
|
||||
// Some ports need to modify the font object when the DPI of the window it
|
||||
// is used with changes, this function can be used to do it.
|
||||
//
|
||||
// Currently it is only used in wxMSW and is not considered to be part of
|
||||
// wxWidgets public API.
|
||||
virtual void WXAdjustToPPI(const wxSize& WXUNUSED(ppi)) { }
|
||||
|
||||
// this doesn't do anything and is kept for compatibility only
|
||||
#if WXWIN_COMPATIBILITY_2_8
|
||||
wxDEPRECATED_INLINE(void SetNoAntiAliasing(bool no = true), wxUnusedVar(no);)
|
||||
|
Reference in New Issue
Block a user