Force lib tree row height on GTK

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16403


(cherry picked from commit c3af434741)
This commit is contained in:
Jon Evans 2024-02-27 19:24:53 -05:00
parent a9e6031ae6
commit bbd4cfd3d4
1 changed files with 6 additions and 0 deletions

View File

@ -156,6 +156,12 @@ LIB_TREE::LIB_TREE( wxWindow* aParent, const wxString& aRecentSearchesKey, LIB_T
m_tree_ctrl = new WX_DATAVIEWCTRL( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, dvFlags );
m_adapter->AttachTo( m_tree_ctrl );
#ifdef __WXGTK__
// The GTK renderer seems to calculate row height incorrectly sometimes; but can be overridden
int rowHeight = FromDIP( 8 ) + GetTextExtent( wxS( "pdI" ) ).y;
m_tree_ctrl->SetRowHeight( rowHeight );
#endif
sizer->Add( m_tree_ctrl, 5, wxRIGHT | wxBOTTOM | wxEXPAND, 5 );
// Description panel