diff --git a/common/displlst.cpp b/common/displlst.cpp index 9da30cbdb1..e03910ee55 100644 --- a/common/displlst.cpp +++ b/common/displlst.cpp @@ -65,7 +65,30 @@ EDA_LIST_DIALOG::EDA_LIST_DIALOG( EDA_DRAW_FRAME* aParent, const wxString& aTitl m_staticTextMsg->Show( false ); } +#if !wxCHECK_VERSION( 2, 9, 0 ) + // wx 2.8.x has bug in wxListCtrl WRT honoring the omission of wxHSCROLL, at least + // on gtk2. Fix by setting minimum width so horizontal wxListCtrl scrolling is + // not needed on 2.8.x because of minumum visible width setting: + { + int width = 0; + + for( unsigned col = 0; col < aItemHeaders.Count(); ++col ) + { + width += m_listBox->GetColumnWidth( col ) + 2; + } + + //width += 40; // vert scroll bar. + + wxSize sz = m_listBox->GetSize(); + + sz.SetWidth( width ); + + m_listBox->SetMinSize( sz ); + } +#endif + Fit(); + Centre(); if( !!aSelection ) { diff --git a/eeschema/dialogs/dialog_edit_component_in_schematic.cpp b/eeschema/dialogs/dialog_edit_component_in_schematic.cpp index 61d33c37d4..f10a58628d 100644 --- a/eeschema/dialogs/dialog_edit_component_in_schematic.cpp +++ b/eeschema/dialogs/dialog_edit_component_in_schematic.cpp @@ -793,13 +793,15 @@ bool DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::copyPanelToSelectedField() rotateCheckBox->SetValue( field.GetOrientation() == TEXT_ORIENT_VERT ); // Copy the text justification - EDA_TEXT_HJUSTIFY_T hjustify[3] = { - GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_HJUSTIFY_CENTER, + static const EDA_TEXT_HJUSTIFY_T hjustify[] = { + GR_TEXT_HJUSTIFY_LEFT, + GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_HJUSTIFY_RIGHT }; - EDA_TEXT_VJUSTIFY_T vjustify[3] = { - GR_TEXT_VJUSTIFY_BOTTOM, GR_TEXT_VJUSTIFY_CENTER, + static const EDA_TEXT_VJUSTIFY_T vjustify[] = { + GR_TEXT_VJUSTIFY_BOTTOM, + GR_TEXT_VJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_TOP };