From 3d41fa1ac48c9a1ac6b1d681a063c0585d456b5c Mon Sep 17 00:00:00 2001 From: Pavel Tyunin Date: Tue, 15 Sep 2020 16:58:54 +0300 Subject: [PATCH] Fix cropping detection when wxPG_BOLD_MODIFIED is enabled --- src/propgrid/propgrid.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/propgrid/propgrid.cpp b/src/propgrid/propgrid.cpp index fc5a0f40ae..310b0ac728 100644 --- a/src/propgrid/propgrid.cpp +++ b/src/propgrid/propgrid.cpp @@ -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 ); }