Take wxPG_XBEFORETEXT and splitter into account for cropping detection

This commit is contained in:
Pavel Tyunin 2020-09-13 22:02:34 +03:00 committed by Artur Wieczorek
parent e4607a243e
commit 7d83c6cfe0

View File

@ -5098,7 +5098,7 @@ bool wxPropertyGrid::HandleMouseMove( int x, unsigned int y,
if ( m_mouseSide == 1 ) if ( m_mouseSide == 1 )
{ {
tipString = m_propHover->GetLabel(); tipString = m_propHover->GetLabel();
space = m_pState->GetColumnWidth(0)-3; space = m_pState->GetColumnWidth(0);
if ( !(m_windowStyle & wxPG_HIDE_CATEGORIES) || m_propHover->GetParent() != m_pState->DoGetRoot() ) if ( !(m_windowStyle & wxPG_HIDE_CATEGORIES) || m_propHover->GetParent() != m_pState->DoGetRoot() )
space -= (m_propHover->GetDepth()-1)*m_subgroup_extramargin; space -= (m_propHover->GetDepth()-1)*m_subgroup_extramargin;
} }
@ -5115,6 +5115,7 @@ bool wxPropertyGrid::HandleMouseMove( int x, unsigned int y,
if ( space ) if ( space )
{ {
space -= (wxPG_XBEFORETEXT + 1);
int tw, th; int tw, th;
GetTextExtent( tipString, &tw, &th, 0, 0 ); GetTextExtent( tipString, &tw, &th, 0, 0 );
if ( tw > space ) if ( tw > space )