From c7b789d351e565607e8b79d60713debd72da524b Mon Sep 17 00:00:00 2001 From: Artur Wieczorek Date: Sat, 4 Apr 2020 18:02:40 +0200 Subject: [PATCH] Increase wxPropertyGrid line height under wxGTK3 Line height calculation based on the font size is not right for wxGTK3 because native buttons (used as in-line editor buttons) don't scale down well and they are not displayed properly within the line. Minimal button size when the label is displayed properly is 35 so this has to be minimal line height under wxGTK3. Closes #18715. --- src/propgrid/propgrid.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/propgrid/propgrid.cpp b/src/propgrid/propgrid.cpp index b31b49d42d..faf9e1763d 100644 --- a/src/propgrid/propgrid.cpp +++ b/src/propgrid/propgrid.cpp @@ -1331,7 +1331,9 @@ void wxPropertyGrid::CalculateFontAndBitmapStuff( int vspacing ) GetTextExtent(wxS("jG"), &x, &y, 0, 0, &m_captionFont); m_lineHeight = m_fontHeight+(2*m_spacingy)+1; - +#if defined(__WXGTK3__) + m_lineHeight = wxMax(35, m_lineHeight); +#endif // button spacing m_buttonSpacingY = (m_lineHeight - m_iconHeight) / 2; if ( m_buttonSpacingY < 0 ) m_buttonSpacingY = 0;