X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8907154c1a8a6882c6797d1f16393ddfb23e7f3a..137c8bde085d6d5b7c459902d2ea1a198ab48765:/src/generic/tipwin.cpp diff --git a/src/generic/tipwin.cpp b/src/generic/tipwin.cpp index 2eba71e722..36dd8b550a 100644 --- a/src/generic/tipwin.cpp +++ b/src/generic/tipwin.cpp @@ -17,25 +17,26 @@ // headers // ---------------------------------------------------------------------------- -// For compilers that support precompilatixon, includes "wx/wx.h". +// For compilers that support precompilation, includes "wx/wx.h". #include "wx/wxprec.h" #ifdef __BORLANDC__ #pragma hdrstop #endif +#if wxUSE_TIPWINDOW + +#include "wx/tipwin.h" + #ifndef WX_PRECOMP #include "wx/dcclient.h" + #include "wx/timer.h" + #include "wx/settings.h" #endif // WX_PRECOMP + #ifdef __WXGTK__ #include #endif -#include "wx/tipwin.h" - -#if wxUSE_TIPWINDOW - -#include "wx/timer.h" -#include "wx/settings.h" // ---------------------------------------------------------------------------- // constants @@ -315,7 +316,7 @@ void wxTipWindowView::Adjust(const wxString& text, wxCoord maxLength) // take into account the border size and the margins width = 2*(TEXT_MARGIN_X + 1) + widthMax; - height = 2*(TEXT_MARGIN_Y + 1) + m_parent->m_textLines.GetCount()*m_parent->m_heightLine; + height = 2*(TEXT_MARGIN_Y + 1) + wx_truncate_cast(wxCoord, m_parent->m_textLines.GetCount())*m_parent->m_heightLine; m_parent->SetClientSize(width, height); SetSize(0, 0, width, height); }