Define ToDIP() in wxHAVE_DPI_INDEPENDENT_PIXELS case too

Previously any code using this function wouldn't link under GTK+ 3 or OS X
where wxHAVE_DPI_INDEPENDENT_PIXELS are defined.

Closes #17310.
This commit is contained in:
Vadim Zeitlin 2015-12-31 00:21:24 +01:00
parent 52a4fac626
commit 017bbdf516

View File

@ -1994,7 +1994,9 @@ inline wxWindow *wxWindowBase::GetGrandParent() const
#ifdef wxHAVE_DPI_INDEPENDENT_PIXELS
// FromDIP() becomes trivial in this case, so make it inline to avoid overhead.
// FromDIP() and ToDIP() become trivial in this case, so make them inline to
// avoid any overhead.
/* static */
inline wxSize
wxWindowBase::FromDIP(const wxSize& sz, const wxWindowBase* WXUNUSED(w))
@ -2002,6 +2004,13 @@ wxWindowBase::FromDIP(const wxSize& sz, const wxWindowBase* WXUNUSED(w))
return sz;
}
/* static */
inline wxSize
wxWindowBase::ToDIP(const wxSize& sz, const wxWindowBase* WXUNUSED(w))
{
return sz;
}
#endif // wxHAVE_DPI_INDEPENDENT_PIXELS
// ----------------------------------------------------------------------------