Menu

#1 Make new header color green

open
Interface (9)
5
2005-08-28
2005-08-28
No

The following code, sent by J. Fourniez, makes new
headers in the headerlist dark green

void BHListViewItem::paintCell( QPainter * p, const
QColorGroup & cg,
int column, int width, int alignment )
{
QColorGroup _cg( cg );

_cg.setColor( QColorGroup::Text, lineColor);

KListViewItem::paintCell( p, _cg, column, width,
alignment );
if (status==BinHeader::bh_new)
{
setPixmap(Subj_Col, BarIcon("icon_article_new",
KIcon::SizeSmall));
lineColor=Qt::darkGreen;
}
else if (status==BinHeader::bh_read)
setPixmap(Subj_Col, BarIcon("icon_article_read",
KIcon::SizeSmall));
else if (status==BinHeader::bh_downloaded)
setPixmap(Subj_Col, BarIcon("icon_binary",
KIcon::SizeSmall));
}

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.