Fix cropping detection when wxPG_BOLD_MODIFIED is enabled

This commit is contained in:
Pavel Tyunin 2020-09-15 16:58:54 +03:00 committed by Artur Wieczorek
parent 949cda937d
commit 3d41fa1ac4

View File

@ -5113,7 +5113,10 @@ bool wxPropertyGrid::HandleMouseMove( int x, unsigned int y,
space -= m_propHover->GetImageOffset(imageWidth);
space -= (wxPG_XBEFORETEXT + 1);
int tw, th;
GetTextExtent( tipString, &tw, &th, 0, 0 );
wxFont* font = NULL;
if ( (m_windowStyle & wxPG_BOLD_MODIFIED) && m_propHover->HasFlag(wxPG_PROP_MODIFIED) )
font = &m_captionFont;
GetTextExtent( tipString, &tw, &th, 0, 0, font );
if ( tw > space )
SetToolTip( tipString );
}