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.
This commit is contained in:
Artur Wieczorek 2020-04-04 18:02:40 +02:00
parent a3cbcc2c6c
commit c7b789d351

View File

@ -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;