Remove custom font from lib_table_grid

Fixes: lp:1738617
* https://bugs.launchpad.net/kicad/+bug/1738617
This commit is contained in:
Oliver Walters 2017-12-21 09:06:57 +01:00 committed by Maciej Suminski
parent 59c527c40c
commit 5c6c60def4
1 changed files with 0 additions and 41 deletions

View File

@ -189,47 +189,6 @@ public:
}
}
/**
* Customize the appearance of LIB_TABLE_ROW entries
* - If not enabled, greyed out and italic
*/
virtual wxGridCellAttr* GetAttr( int aRow, int aCol, wxGridCellAttr::wxAttrKind aKind) override
{
auto* attr = wxGridTableBase::GetAttr( aRow, aCol, aKind );
if( aRow < (int) size() )
{
if( !attr )
{
attr = new wxGridCellAttr();
}
wxFont font;
if( attr->HasFont() )
{
font = attr->GetFont();
}
LIB_TABLE_ROW* r = at( (size_t) aRow );
if( r && r->GetIsEnabled() )
{
font.SetStyle( wxFONTSTYLE_NORMAL );
attr->SetTextColour( COLOUR_ROW_ENABLED );
}
else
{
font.SetStyle( wxFONTSTYLE_ITALIC );
attr->SetTextColour( COLOUR_ROW_DISABLED );
}
attr->SetFont( font );
}
return attr;
}
protected:
virtual LIB_TABLE_ROW* at( size_t aIndex ) = 0;