- // default foreground colour
- wxWindow *listctrl = m_owner->GetParent();
- wxColour colText;
- if ( highlighted )
- {
- colText = wxSystemSettings::GetSystemColour( wxSYS_COLOUR_HIGHLIGHTTEXT );
- }
- else
- {
- colText = listctrl->GetForegroundColour();
- }
-
- // default font
- wxFont font = listctrl->GetFont();
-
- // VZ: currently we set the colours/fonts only once, but like this (i.e.
- // using SetAttributes() inside the loop), it will be trivial to
- // customize the subitems (in report mode) too.
- wxListItemData *item = m_items.GetFirst()->GetData();
- wxListItemAttr *attr = item->GetAttributes();
- SetAttributes(dc, attr, colText, font, highlighted);
-
- bool hasBgCol = attr && attr->HasBackgroundColour();
- if ( highlighted || hasBgCol )
+ // TODO: later we should support setting different attributes for
+ // different columns - to do it, just add "col" argument to
+ // GetAttr() and move these lines into the loop below
+ wxListItemAttr *attr = GetAttr();
+ if ( SetAttributes(dc, attr, highlighted) )