- 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 )
- {
- if ( highlighted )
- {
- dc->SetBrush( *m_owner->m_highlightBrush );
- }
- else
- {
- if ( hasBgCol )
- dc->SetBrush(wxBrush(attr->GetBackgroundColour(), wxSOLID));
- else
- dc->SetBrush( * wxWHITE_BRUSH );
- }
-
- dc->SetPen( * wxTRANSPARENT_PEN );