Replace wxTreeItemAttr and wxListItemAttr with wxItemAttr
The two existing structs were completely identical, just replace them with a single wxItemAttr. Notice that wxDataViewItemAttr is not quite the same, although pretty similar, so it remains separate for now. It would be nice to combine it with this one too in the future, e.g. to make it simpler to make items bold in a wxListCtrl.
This commit is contained in:
@@ -244,10 +244,10 @@ void wxListCtrlBase::EnableAlternateRowColours(bool enable)
|
||||
}
|
||||
}
|
||||
|
||||
wxListItemAttr *wxListCtrlBase::OnGetItemAttr(long item) const
|
||||
wxItemAttr *wxListCtrlBase::OnGetItemAttr(long item) const
|
||||
{
|
||||
return (m_alternateRowColour.GetBackgroundColour().IsOk() && (item % 2))
|
||||
? wxConstCast(&m_alternateRowColour, wxListItemAttr)
|
||||
? wxConstCast(&m_alternateRowColour, wxItemAttr)
|
||||
: NULL; // no attributes by default
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user