From 7d83c6cfe06ac50d5bf1e09d9152952fd91c2bcb Mon Sep 17 00:00:00 2001 From: Pavel Tyunin Date: Sun, 13 Sep 2020 22:02:34 +0300 Subject: [PATCH] Take wxPG_XBEFORETEXT and splitter into account for cropping detection --- src/propgrid/propgrid.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/propgrid/propgrid.cpp b/src/propgrid/propgrid.cpp index ed60c9f7b8..61302cc2bc 100644 --- a/src/propgrid/propgrid.cpp +++ b/src/propgrid/propgrid.cpp @@ -5098,7 +5098,7 @@ bool wxPropertyGrid::HandleMouseMove( int x, unsigned int y, if ( m_mouseSide == 1 ) { 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() ) space -= (m_propHover->GetDepth()-1)*m_subgroup_extramargin; } @@ -5115,6 +5115,7 @@ bool wxPropertyGrid::HandleMouseMove( int x, unsigned int y, if ( space ) { + space -= (wxPG_XBEFORETEXT + 1); int tw, th; GetTextExtent( tipString, &tw, &th, 0, 0 ); if ( tw > space )