diff --git a/common/include/Utilities/wxGuiTools.h b/common/include/Utilities/wxGuiTools.h index 1f15ceda55..e182f56776 100644 --- a/common/include/Utilities/wxGuiTools.h +++ b/common/include/Utilities/wxGuiTools.h @@ -799,7 +799,6 @@ extern wxString pxGetAppName(); extern int pxGetCharHeight( const wxWindow* wind, int rows=1 ); extern int pxGetCharHeight( const wxWindow& wind, int rows=1 ); -extern wxString pxFormatToolTipText( wxWindow* wind, const wxString& src ); extern void pxSetToolTip( wxWindow* wind, const wxString& src ); extern void pxSetToolTip( wxWindow& wind, const wxString& src ); extern wxFont pxGetFixedFont( int ptsize=8, int weight=wxNORMAL ); diff --git a/common/src/Utilities/pxCheckBox.cpp b/common/src/Utilities/pxCheckBox.cpp index a3fcda9c64..26bfa224ee 100644 --- a/common/src/Utilities/pxCheckBox.cpp +++ b/common/src/Utilities/pxCheckBox.cpp @@ -75,9 +75,8 @@ pxCheckBox& pxCheckBox::SetSubPadding( int pad ) // performs word wrapping on platforms that need it (eg mswindows). pxCheckBox& pxCheckBox::SetToolTip( const wxString& tip ) { - const wxString wrapped( pxFormatToolTipText(this, tip) ); - pxSetToolTip( m_checkbox, wrapped ); - pxSetToolTip( m_subtext, wrapped ); + pxSetToolTip( m_checkbox, tip ); + pxSetToolTip( m_subtext, tip ); return *this; } diff --git a/common/src/Utilities/pxRadioPanel.cpp b/common/src/Utilities/pxRadioPanel.cpp index a221391c86..c863b7a2f7 100644 --- a/common/src/Utilities/pxRadioPanel.cpp +++ b/common/src/Utilities/pxRadioPanel.cpp @@ -107,12 +107,11 @@ void pxRadioPanel::Realize() void pxRadioPanel::_setToolTipImmediate( int idx, const wxString &tip ) { - const wxString wrapped( pxFormatToolTipText(this, tip) ); if( wxRadioButton* woot = m_objects[idx].LabelObj ) - woot->SetToolTip( wrapped ); + woot->SetToolTip(tip); if( pxStaticText* woot = m_objects[idx].SubTextObj ) - woot->SetToolTip( wrapped ); + woot->SetToolTip(tip); } // The SetToolTip API provided by this function applies the tooltip to both the radio diff --git a/common/src/Utilities/wxGuiTools.cpp b/common/src/Utilities/wxGuiTools.cpp index a4b72926c3..a142629ddf 100644 --- a/common/src/Utilities/wxGuiTools.cpp +++ b/common/src/Utilities/wxGuiTools.cpp @@ -569,32 +569,16 @@ const wxCursor& MoreStockCursors::GetArrowWait() MoreStockCursors StockCursors; // -------------------------------------------------------------------------------------- -// pxFormatToolTipText / pxSetToolTip +// pxSetToolTip // -------------------------------------------------------------------------------------- -// This is the preferred way to assign tooltips to wxWindow-based objects, as it performs the -// necessary text wrapping on platforms that need it. On windows tooltips are wrapped at 600 -// pixels, or 66% of the screen width, whichever is smaller. GTK and MAC perform internal -// wrapping, so this function does a regular assignment there. - -wxString pxFormatToolTipText( wxWindow* wind, const wxString& src ) -{ - // Windows needs manual tooltip word wrapping (sigh). - // GTK and Mac are a wee bit more clever (except in GTK tooltips don't show at all - // half the time because of some other bug .. sigh) - -#ifdef __WXMSW__ - if( wind == NULL ) return src; // Silently ignore nulls - int whee = wxGetDisplaySize().GetWidth() * 0.75; - return pxTextWrapper().Wrap( *wind, src, std::min( whee, 600 ) ).GetResult(); -#else - return src; -#endif -} +// This is the preferred way to assign tooltips to wxWidgets-based objects. On Windows it +// extends the tooltip time to the maximum possible. GTK seems to have indefinite +// tooltips, I don't know about OS X. void pxSetToolTip( wxWindow* wind, const wxString& src ) { if( wind == NULL ) return; // Silently ignore nulls - wind->SetToolTip( pxFormatToolTipText(wind, src) ); + wind->SetToolTip(src); // Make tooltips show for as long as possible on Windows. Linux (GTK) can // show tooltips indefinitely.