Work around wx 2.8 bug in wxListControl not honoring omissing of wxHSCROLL.
This commit is contained in:
parent
300a047ffe
commit
b177716b65
|
@ -65,7 +65,30 @@ EDA_LIST_DIALOG::EDA_LIST_DIALOG( EDA_DRAW_FRAME* aParent, const wxString& aTitl
|
||||||
m_staticTextMsg->Show( false );
|
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();
|
Fit();
|
||||||
|
Centre();
|
||||||
|
|
||||||
if( !!aSelection )
|
if( !!aSelection )
|
||||||
{
|
{
|
||||||
|
|
|
@ -793,13 +793,15 @@ bool DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::copyPanelToSelectedField()
|
||||||
rotateCheckBox->SetValue( field.GetOrientation() == TEXT_ORIENT_VERT );
|
rotateCheckBox->SetValue( field.GetOrientation() == TEXT_ORIENT_VERT );
|
||||||
|
|
||||||
// Copy the text justification
|
// Copy the text justification
|
||||||
EDA_TEXT_HJUSTIFY_T hjustify[3] = {
|
static const EDA_TEXT_HJUSTIFY_T hjustify[] = {
|
||||||
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_HJUSTIFY_CENTER,
|
GR_TEXT_HJUSTIFY_LEFT,
|
||||||
|
GR_TEXT_HJUSTIFY_CENTER,
|
||||||
GR_TEXT_HJUSTIFY_RIGHT
|
GR_TEXT_HJUSTIFY_RIGHT
|
||||||
};
|
};
|
||||||
|
|
||||||
EDA_TEXT_VJUSTIFY_T vjustify[3] = {
|
static const EDA_TEXT_VJUSTIFY_T vjustify[] = {
|
||||||
GR_TEXT_VJUSTIFY_BOTTOM, GR_TEXT_VJUSTIFY_CENTER,
|
GR_TEXT_VJUSTIFY_BOTTOM,
|
||||||
|
GR_TEXT_VJUSTIFY_CENTER,
|
||||||
GR_TEXT_VJUSTIFY_TOP
|
GR_TEXT_VJUSTIFY_TOP
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue