Commit b177716b authored by Dick Hollenbeck's avatar Dick Hollenbeck

Work around wx 2.8 bug in wxListControl not honoring omissing of wxHSCROLL.

parent 300a047f
......@@ -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 )
{
......
......@@ -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
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment